Skip to content

Instantly share code, notes, and snippets.

@nlgranger
Created February 9, 2017 14:49
Show Gist options
  • Save nlgranger/55516b7c31cb2354d2f18bf35c08ba2e to your computer and use it in GitHub Desktop.
Save nlgranger/55516b7c31cb2354d2f18bf35c08ba2e to your computer and use it in GitHub Desktop.
Minimal Nvidia docker with latest torch version
FROM nvidia/cuda:8.0-cudnn5-devel
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y --no-install-recommends openssl ca-certificates \
git-core cmake curl wget unzip gfortran libreadline-dev ncurses-dev \
libgoogle-glog-dev libboost-dev libboost-thread-dev libopenblas-dev
# Core Torch packages
RUN git clone https://github.com/torch/luajit-rocks.git
RUN cd luajit-rocks && mkdir build && cd build \
&& cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
-DWITH_LUAJIT21=ON -DLUAJIT_ENABLE_LUA52COMPAT=ON .. \
&& make && make install
RUN luarocks install torch
RUN luarocks install trepl
# Common torch package
RUN luarocks install luafilesystem
RUN luarocks install --server=http://luarocks.org/dev luash
RUN luarocks install nn
RUN luarocks install optnet
RUN luarocks install xlua
RUN luarocks install cudnn
CMD /bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment