-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile.gpu
94 lines (83 loc) · 2.25 KB
/
Dockerfile.gpu
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
FROM tensorflow/tensorflow:latest-gpu-py3
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
RUN add-apt-repository ppa:git-core/ppa
RUN apt-get update --fix-missing && apt-get install -y wget bzip2 ca-certificates \
build-essential \
byobu \
ca-certificates \
git-core git \
htop \
libglib2.0-0 \
libjpeg-dev \
libpng-dev \
libxext6 \
libsm6 \
libxrender1 \
libcupti-dev \
openssh-server \
software-properties-common \
vim \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
#################### Install Anaconda
# Why Anaconda? Its recommended Package Manager For PyTorch
# The following section is from https://hub.docker.com/r/continuumio/anaconda3/~/dockerfile/
# You may have to check this periodically and update
RUN echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh && \
wget --quiet https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh -O ~/anaconda.sh && \
/bin/bash ~/anaconda.sh -b -p /opt/conda && \
rm ~/anaconda.sh
ENV PATH /opt/conda/bin:$PATH
##################
# Install Pytorch Instructions at http://pytorch.org/
RUN conda install -y pytorch torchvision cuda90 -c pytorch
RUN conda install -y opencv
# Install Python packages
RUN pip --no-cache-dir install --upgrade \
altair \
annoy \
bcolz \
dask \
fastai \
gensim \
graphviz \
h5py \
hdfs \
isoweek \
jsonpath_rw_ext \
jupyter_contrib_nbextensions \
jupyterthemes \
tensorflow-gpu \
keras \
ktext \
more_itertools \
nmslib \
pandas_summary \
Pillow \
pyhive \
spacy \
sklearn_pandas \
textacy \
torchtext \
tqdm \
wget
#For Fairseq-py
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64
RUN echo 'export PATH="/opt/conda/bin/:$PATH"' >> ~/.bashrc
# Open Ports for TensorBoard, Jupyter, and SSH
EXPOSE 6006
EXPOSE 7654
EXPOSE 22
#Setup File System
RUN mkdir ds
ENV HOME=/ds
ENV SHELL=/bin/bash
VOLUME /ds
WORKDIR /ds
ADD run_jupyter.sh /ds/run_jupyter.sh
RUN chmod +x /ds/run_jupyter.sh
# Run the shell
CMD [ "/bin/bash" ]