forked from DOI-USGS/dataRetrieval
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (43 loc) · 1.46 KB
/
Copy pathDockerfile
File metadata and controls
48 lines (43 loc) · 1.46 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM code.chs.usgs.gov:5001/ctek/docker/r-lang/r-base:4.6
# Change the name of this environment to something which pleases you, if you
# so please. But the name will not be relevant for most cases, as reticulate
# will be pointed to the environment no matter what it is named.
ARG CONDA_ENVIRONMENT_NAME=dataretrieval
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
wget \
&& rm -rf /var/lib/apt/lists/*
RUN wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" && \
bash Miniforge3.sh -b -p "${HOME}/conda" && \
rm Miniforge3.sh
ENV CONDA_DIR="/root/conda"
ENV PATH=$CONDA_DIR/bin:$PATH
COPY environment.yml /
RUN conda env create -n ${CONDA_ENVIRONMENT_NAME} -f /environment.yml && conda clean -a -y
# Necessary R libraries
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
r-cran-rcmdcheck \
r-cran-testthat \
r-cran-pkgdown \
r-cran-rmarkdown \
r-cran-knitr \
r-cran-dt \
r-cran-data.table \
r-cran-dplyr \
r-cran-purrr \
r-cran-lubridate \
r-cran-tidyr \
r-cran-jsonlite \
r-cran-readr \
r-cran-xml2 \
r-cran-httr2 \
r-cran-covr \
r-cran-sf \
r-cran-patchwork \
r-cran-leaflet \
r-cran-readxl \
r-cran-whisker \
r-cran-ggplot2 \
r-cran-reticulate \
&& rm -rf /var/lib/apt/lists/*
ENV RETICULATE_PYTHON=/root/conda/envs/${CONDA_ENVIRONMENT_NAME}/bin/python