generated from nlpsandbox/i2b2-phi-dataset
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
31 lines (26 loc) · 1.02 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
30
31
FROM sagebionetworks/rstudio:4.1.0-efb64703
LABEL maintainer="[email protected]"
LABEL description="Example notebooks for interacting with the NLP Sandbox API"
# Create conda environments
COPY conda /tmp/conda
RUN conda init bash \
&& conda env create -f /tmp/conda/nlpsandbox/environment.yml \
&& rm -fr /tmp/conda \
# Fix libssl issue that affects conda env used with reticulate
&& cp /usr/lib/x86_64-linux-gnu/libssl.so.1.1 \
/opt/miniconda/envs/nlpsandbox/lib/libssl.so.1.1 \
&& conda activate base || true \
&& echo "conda activate nlpsandbox" >> ~/.bashrc
# Install R dependencies
COPY renv.lock /tmp/renv.lock
RUN install2.r --error renv \
&& R -e "renv::consent(provided=TRUE)" \
&& R -e "renv::restore(lockfile='/tmp/renv.lock')" \
&& rm -rf /tmp/downloaded_packages/ /tmp/*.rds /tmp/renv.lock \
&& R -e "extrafont::font_import(prompt=FALSE)"
WORKDIR /
COPY docker-entrypoint.sh .
RUN chmod +x docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["rstudio"]
# CMD ["jupyter"]