This repository has been archived by the owner on Sep 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
42 lines (29 loc) · 1.63 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
32
33
34
35
36
37
38
39
40
41
42
# DockerHub unaltered mirror of AWS Deep Learning Container
FROM armandmcqueen/tensorflow-training:1.13-horovod-gpu-py36-cu100-ubuntu16.04
RUN apt-get install less
# Need to reinstall some libraries the DL container provides due to custom Tensorflow binary
RUN pip uninstall -y tensorflow tensorboard tensorflow-estimator keras h5py horovod numpy
# Download and install custom Tensorflow binary
RUN wget https://github.com/armandmcqueen/tensorpack-mask-rcnn/releases/download/v0.0.0-WIP/tensorflow-1.13.0-cp36-cp36m-linux_x86_64.whl && \
pip install tensorflow-1.13.0-cp36-cp36m-linux_x86_64.whl && \
pip install tensorflow-estimator==1.13.0 && \
rm tensorflow-1.13.0-cp36-cp36m-linux_x86_64.whl
RUN pip install keras h5py
# Install Horovod, temporarily using CUDA stubs
RUN ldconfig /usr/local/cuda-10.0/targets/x86_64-linux/lib/stubs && \
HOROVOD_GPU_ALLREDUCE=NCCL HOROVOD_WITH_TENSORFLOW=1 pip install --no-cache-dir horovod==0.15.2 && \
ldconfig
# Install OpenSSH for MPI to communicate between containers
RUN mkdir -p /root/.ssh/ && \
ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
printf "Host *\n StrictHostKeyChecking no\n" >> /root/.ssh/config
RUN pip install Cython
RUN pip install ujson opencv-python pycocotools matplotlib
RUN pip install --ignore-installed numpy==1.16.2
# TODO: Do I really need this now that we are using the DL container?
ARG CACHEBUST=1
ARG BRANCH_NAME
RUN git clone https://github.com/armandmcqueen/tensorpack-mask-rcnn -b $BRANCH_NAME
RUN chmod -R +w /tensorpack-mask-rcnn
RUN pip install --ignore-installed -e /tensorpack-mask-rcnn/