-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (37 loc) · 1.91 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
FROM debian:8.2
# APT dependencies
RUN apt-get update \
&& apt-get install -qy \
cmake \
gfortran \
git-core \
g++ \
libtie-persistent-perl \
libreadline-dev \
make \
module-init-tools \
unzip \
wget \
&& apt-get clean
# NVIDIA drivers & CUDA runtime
RUN cd /tmp && \
wget -nv http://us.download.nvidia.com/XFree86/Linux-x86_64/346.96/NVIDIA-Linux-x86_64-346.96.run -O driver.run && \
sh driver.run -s --no-kernel-module && \
wget -nv http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/cuda_7.0.28_linux.run -O cuda.run && \
sh cuda.run --toolkit --silent && \
rm *
# OpenBLAS
RUN git clone https://github.com/xianyi/OpenBLAS.git -b v0.2.14 /tmp/openblas && \
cd /tmp/openblas && \
make NO_AFFINITY=1 USE_OPENMP=1 DYNAMIC_ARCH=1 NUM_THREADS=8 && \
make install && \
cd /tmp && rm -r *
# Torch7
RUN git clone https://github.com/torch/distro.git /opt/torch && \
cd /opt/torch && \
./install.sh -b && \
ls | grep -v "^install$" | xargs rm -r && rm -r .git
# Setup paths
ENV PATH=/usr/local/cuda/bin:/opt/torch/install/bin:${PATH} \
LD_LIBRARY_PATH=/usr/local/cuda/lib64:/opt/torch/install/lib:${LD_LIBRARY_PATH}
CMD ["th"]