/
Dockerfile
37 lines (31 loc) · 1.41 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
# Start with cuDNN base image
FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
MAINTAINER Kai Arulkumaran <design@kaixhin.com>
# Install git, apt-add-repository and dependencies for iTorch
RUN apt-get update && apt-get install -y \
git \
software-properties-common \
libssl-dev \
libzmq3-dev \
python-dev \
python-pip \
python-zmq \
sudo
# Install Jupyter Notebook for iTorch
RUN pip install --upgrade pip
RUN pip install jupyter
# Run Torch7 installation scripts
RUN git clone https://github.com/torch/distro.git /root/torch --recursive && cd /root/torch && \
bash install-deps && \
./install.sh -b
# Export environment variables manually
ENV LUA_PATH='/root/.luarocks/share/lua/5.1/?.lua;/root/.luarocks/share/lua/5.1/?/init.lua;/root/torch/install/share/lua/5.1/?.lua;/root/torch/install/share/lua/5.1/?/init.lua;./?.lua;/root/torch/install/share/luajit-2.1.0-beta1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua'
ENV LUA_CPATH='/root/.luarocks/lib/lua/5.1/?.so;/root/torch/install/lib/lua/5.1/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so'
ENV PATH=/root/torch/install/bin:$PATH
ENV LD_LIBRARY_PATH=/root/torch/install/lib:$LD_LIBRARY_PATH
ENV DYLD_LIBRARY_PATH=/root/torch/install/lib:$DYLD_LIBRARY_PATH
ENV LUA_CPATH='/root/torch/install/lib/?.so;'$LUA_CPATH
# Install iTorch
RUN luarocks install itorch
# Set ~/torch as working directory
WORKDIR /root/torch