-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (19 loc) · 1.04 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM rstudio/plumber
RUN apt-get update
# Preemptively install libglpk. igraph has an unmanaged dependency on it.
RUN apt-get install -y libglpk40
# install Python and Spacy packages into the R environment
# Python dependency tree resolution can take a *very* long time.
RUN R -e "install.packages(c('spacyr', 'reticulate'))"
RUN R -e "reticulate::install_miniconda()"
RUN R -e "spacyr::spacy_install(version = '3.5.2', python_version = '3.10', prompt = FALSE, lang_models = c('en_core_web_md', 'fr_core_news_md'))"
# install the more typical R packages
RUN R -e "install.packages(c('tidyr', 'dplyr', 'stringr', 'textcat', 'fastText', 'readr', 'janitor', 'readxl', 'purrr', 'stringi', 'tidytext', 'quanteda', 'tibble', 'numbers', 'stringdist', 'tm', 'textreuse', 'ggplot2', 'httr'))" \
R -e "install.packages(c('jsonlite', 'igraph', 'tokenizers', 'gtools', 'glue', 'arrow', 'dotenv', 'gtools', 'NLP', 'memoise'))"
# CWD
WORKDIR /
# copy things
# excluding files like README.md in .dockerignore
COPY ./ /app/
# Launch Plumber
CMD ["/app/plumber.R"]