-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
58 lines (51 loc) · 1.76 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04
RUN echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list
ENV TZ=Asia/Seoul
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN echo "XKBMODEL=\"pc105\"\n \
XKBLAYOUT=\"us\"\n \
XKBVARIANT=\"\"\n \
XKBOPTIONS=\"\"" > /etc/default/keyboard
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
curl \
vim \
ca-certificates \
libnccl2=2.1.4-1+cuda9.0 \
libnccl-dev=2.1.4-1+cuda9.0 \
libjpeg-dev \
libpng-dev \
sudo \
apt-utils \
man \
tmux \
less \
wget \
iputils-ping \
zsh \
htop \
software-properties-common \
tzdata \
locales \
openssh-server \
xauth \
rsync &&\
rm -rf /var/lib/apt/lists/*
RUN locale-gen en_US.UTF-8
ENV LANG="en_US.UTF-8" LANGUAGE="en_US:en" LC_ALL="en_US.UTF-8"
RUN curl -o ~/miniconda.sh -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
chmod +x ~/miniconda.sh && \
~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh
ENV PATH /opt/conda/bin:$PATH
RUN conda install -y -c pytorch pytorch torchvision magma-cuda80 && \
conda clean -ya
RUN echo "export PATH=/opt/conda/bin:\$PATH" > /etc/profile.d/conda.sh
RUN echo "export PATH=/usr/local/nvidia/bin:\$PATH" > /etc/profile.d/nvidia.sh
RUN echo "X11UseLocalhost no" >> /etc/ssh/sshd_config
ENV PYTHONUNBUFFERED=1
WORKDIR /root
EXPOSE 22 80 443 8000
ENTRYPOINT service ssh restart && ldconfig && bash