forked from determined-ai/environments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-default-rocm
75 lines (65 loc) · 2 KB
/
Dockerfile-default-rocm
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
RUN mkdir -p /var/run/sshd
RUN rm /etc/apt/sources.list.d/rocm.list
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
autoconf \
automake \
autotools-dev \
build-essential \
ca-certificates \
curl \
daemontools \
libkrb5-dev \
libssl-dev \
libtool \
git \
krb5-user \
cmake \
g++-4.8 \
make \
openssh-client \
openssh-server \
pkg-config \
wget \
nfs-common \
unattended-upgrades \
&& unattended-upgrade \
&& rm -rf /var/lib/apt/lists/* \
&& rm /etc/ssh/ssh_host_ecdsa_key \
&& rm /etc/ssh/ssh_host_ed25519_key \
&& rm /etc/ssh/ssh_host_rsa_key
COPY dockerfile_scripts /tmp/det_dockerfile_scripts
RUN pip install determined && pip uninstall -y determined
RUN pip install -r /tmp/det_dockerfile_scripts/notebook-requirements.txt
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/add_det_nobody_user.sh
RUN /tmp/det_dockerfile_scripts/install_libnss_determined.sh
RUN /tmp/det_dockerfile_scripts/install_google_cloud_sdk.sh
# google-api-python-client -> google-api-core -> googleapis-common-protos -> protobuf
# Horovod cannot build with protobuf > 3.20.x
# latest google-api-python-client requires protobuf >= 3.20.1
RUN pip install protobuf==3.20.1
ARG TENSORFLOW_PIP
RUN if [ "$TENSORFLOW_PIP" ]; then pip install $TENSORFLOW_PIP; fi
# Reset these because we set GPU_OPERATIONS later.
ENV HOROVOD_GPU_BROADCAST=
ENV HOROVOD_GPU_ALLREDUCE=
ARG HOROVOD_PIP
ARG HOROVOD_NCCL_HOME=/opt/rocm/rccl
ARG HOROVOD_WITH_TENSORFLOW=1
ARG HOROVOD_WITH_PYTORCH=1
ARG HOROVOD_WITHOUT_MXNET=1
ARG HOROVOD_GPU_OPERATIONS=NCCL
ARG HOROVOD_WITHOUT_MPI=1
ARG HOROVOD_GPU=ROCM
ARG HOROVOD_WITHOUT_MPI=1
ENV LD_LIBRARY_PATH=/opt/rocm/lib:/opt/rocm/hip/lib
RUN if [ "$HOROVOD_PIP" != "0" ]; then pip install "${HOROVOD_PIP}" ; fi
RUN rm -r /tmp/*
# Reset entrypoint.
ENTRYPOINT []
USER root