forked from determined-ai/environments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-pytorch-ngc
36 lines (26 loc) · 1.36 KB
/
Dockerfile-pytorch-ngc
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
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
# NGC images contain user owned files in /usr/lib
RUN chown root:root /usr/lib
# Copy various shell scripts that group dependencies for install
COPY dockerfile_scripts /tmp/det_dockerfile_scripts
RUN /tmp/det_dockerfile_scripts/install_deb_packages.sh
RUN /tmp/det_dockerfile_scripts/add_det_nobody_user.sh
RUN /tmp/det_dockerfile_scripts/install_libnss_determined.sh
# We uninstall these packages after installing. This ensures that we can
# successfully install these packages into containers running as non-root.
# `pip` does not uninstall dependencies, so we still have all the dependencies
# installed.
RUN python -m pip install determined && python -m pip uninstall -y determined
RUN python -m pip install \
-r /tmp/det_dockerfile_scripts/additional-requirements-torch.txt \
-r /tmp/det_dockerfile_scripts/additional-requirements.txt
RUN python -m pip install -r /tmp/det_dockerfile_scripts/notebook-requirements.txt && \
jupyter labextension disable "@jupyterlab/apputils-extension:announcements"
ENV JUPYTER_CONFIG_DIR=/run/determined/jupyter/config
ENV JUPYTER_DATA_DIR=/run/determined/jupyter/data
ENV JUPYTER_RUNTIME_DIR=/run/determined/jupyter/runtime
RUN /tmp/det_dockerfile_scripts/install_google_cloud_sdk.sh
ENV DEEPSPEED_PIP="deepspeed==0.13.0"
RUN /tmp/det_dockerfile_scripts/install_deepspeed.sh
RUN rm -r /tmp/*