-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
36 lines (28 loc) · 1.09 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
# Build with: docker build -t claudiofahey/tensorflow:19.09-py3-custom .
FROM nvcr.io/nvidia/tensorflow:19.09-py3
MAINTAINER Claudio Fahey <[email protected]>
# Install SSH and various utilities.
RUN apt-get update && apt-get install -y --no-install-recommends \
openssh-client \
openssh-server \
lsof \
&& \
rm -rf /var/lib/apt/lists/*
# Configure SSHD for MPI.
RUN mkdir -p /var/run/sshd && \
mkdir -p /root/.ssh && \
echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config && \
echo "UserKnownHostsFile /dev/null" >> /etc/ssh/ssh_config && \
sed -i 's/^#*Port 22/Port 2222/' /etc/ssh/sshd_config && \
echo "HOST *" >> /root/.ssh/config && \
echo "PORT 2222" >> /root/.ssh/config && \
mkdir -p /root/.ssh && \
ssh-keygen -t rsa -b 4096 -f /root/.ssh/id_rsa -N "" && \
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
chmod 700 /root/.ssh && \
chmod 600 /root/.ssh/*
# Install Python libraries.
COPY requirements.txt /tmp/requirements.txt
RUN pip install --requirement /tmp/requirements.txt
WORKDIR /scripts
EXPOSE 2222