-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathDockerfile
More file actions
58 lines (48 loc) · 1.94 KB
/
Dockerfile
File metadata and controls
58 lines (48 loc) · 1.94 KB
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
FROM ubuntu:18.04
MAINTAINER MLPerf MLBox Working Group
# Remove all stopped containers: docker rm $(docker ps -a -q)
# Remove containers like none:none: docker rmi $(docker images | grep none | awk '{print $3}')
RUN apt-get update && \
apt-get install -y --no-install-recommends \
software-properties-common \
python3-dev \
wget \
cmake \
g++-4.8 \
git \
vim \
ca-certificates \
libibverbs1 \
librdmacm1 \
ibverbs-providers \
build-essential \
curl && \
rm -rf /var/lib/apt/lists/*
# Ubuntu 18.04 provides python 3.6
RUN curl -fSsL -O https://bootstrap.pypa.io/pip/3.6/get-pip.py && \
python3 get-pip.py && \
rm get-pip.py
RUN mkdir /tmp/openmpi && \
cd /tmp/openmpi && \
wget https://www.open-mpi.org/software/ompi/v4.0/downloads/openmpi-4.0.0.tar.gz && \
tar zxf openmpi-4.0.0.tar.gz && \
cd openmpi-4.0.0 && \
./configure --enable-orterun-prefix-by-default && \
make -j $(nproc) all && \
make install && \
ldconfig && \
rm -rf /tmp/openmpi
COPY requirements.txt /requirements.txt
RUN pip3 install --no-cache-dir -r /requirements.txt
RUN HOROVOD_WITH_TENSORFLOW=1 pip install --no-cache-dir horovod
# Install OpenSSH for MPI to communicate between containers
RUN apt-get update && apt-get install -y --no-install-recommends openssh-client openssh-server && \
mkdir -p /var/run/sshd
# Allow OpenSSH to talk to containers without asking for confirmation
RUN cat /etc/ssh/ssh_config | grep -v StrictHostKeyChecking > /etc/ssh/ssh_config.new && \
echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config.new && \
mv /etc/ssh/ssh_config.new /etc/ssh/ssh_config
#COPY emdenoise_minibatch_v1.zip /workspace/data/em_denoise_data.zip
#RUN apt-get update && apt-get install zip unzip
COPY main.py /workspace/main.py
ENTRYPOINT ["python3", "/workspace/main.py"]