forked from determined-ai/environments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-default-cpu
50 lines (42 loc) · 1.51 KB
/
Dockerfile-default-cpu
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
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
COPY dockerfile_scripts /tmp/det_dockerfile_scripts
RUN /tmp/det_dockerfile_scripts/install_google_cloud_sdk.sh
ARG TARGETPLATFORM
ARG TENSORFLOW_PIP
ARG TORCH_PIP
ARG TORCHVISION_PIP
RUN if [ "$TENSORFLOW_PIP" ]; then \
export HOROVOD_WITH_TENSORFLOW=1 && \
if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
TENSORFLOW_AARCH64_PIP=$(printf '%s' "$TENSORFLOW_PIP" | sed 's/cpu/aarch64/') \
&& pip install $TENSORFLOW_AARCH64_PIP; \
else \
pip install $TENSORFLOW_PIP; \
fi; \
else \
export HOROVOD_WITH_TENSORFLOW=0; \
fi
RUN if [ "$TORCH_PIP" ]; then \
if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
TORCH_AARCH64_PIP=$(printf '%s' "$TORCH_PIP" | sed 's/+cpu//g') \
&& pip install $TORCH_AARCH64_PIP; \
else \
pip install $TORCH_PIP; \
fi; \
fi
RUN if [ "$TORCHVISION_PIP" ]; then pip install $TORCHVISION_PIP; fi
ARG TORCH_TB_PROFILER_PIP
RUN if [ "$TORCH_TB_PROFILER_PIP" ]; then pip install $TORCH_TB_PROFILER_PIP; fi
ARG HOROVOD_WITH_TENSORFLOW
RUN if [ "$HOROVOD_WITH_TENSORFLOW" ]; then export HOROVOD_WITH_TENSORFLOW=$HOROVOD_WITH_TENSORFLOW; fi
ARG HOROVOD_PIP=horovod
ARG HOROVOD_WITH_PYTORCH=1
ARG HOROVOD_WITHOUT_MXNET=1
ARG HOROVOD_WITH_MPI
ARG HOROVOD_CPU_OPERATIONS
ARG HOROVOD_WITHOUT_MPI
RUN pip install cmake==3.22.4 protobuf==3.20.3
RUN pip install "$HOROVOD_PIP"
RUN pip install -r /tmp/det_dockerfile_scripts/additional-requirements.txt
RUN rm -r /tmp/*