From f8f696d094390f636dc63b476be04fda547bc00f Mon Sep 17 00:00:00 2001 From: mynameisvinn Date: Wed, 19 Oct 2016 21:18:26 -0400 Subject: [PATCH 1/2] include dockerfile for fast neural transfer --- Dockerfile | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..421c086 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,41 @@ +# Start with Ubuntu base image +FROM ubuntu:14.04 +MAINTAINER Kai Arulkumaran + +# Install git, apt-add-repository and dependencies for iTorch +RUN apt-get update && apt-get install -y \ + git \ + software-properties-common \ + ipython3 \ + libssl-dev \ + libzmq3-dev \ + python-zmq \ + python-pip + +# Install Jupyter Notebook for iTorch +RUN pip install notebook ipywidgets + +# Run Torch7 installation scripts +RUN git clone https://github.com/torch/distro.git /root/torch --recursive && cd /root/torch && \ + bash install-deps && \ + ./install.sh + +# Set ~/torch as working directory +WORKDIR /root/torch + +# 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 + +# fetch fast neural style +RUN git clone https://github.com/jcjohnson/fast-neural-style + +# install necessary packages +RUN luarocks install torch +RUN luarocks install nn +RUN luarocks install image +RUN luarocks install lua-cjson \ No newline at end of file From 21280e2a4b69ba26a30da3a54953863f1c916740 Mon Sep 17 00:00:00 2001 From: mynameisvinn Date: Wed, 19 Oct 2016 21:21:18 -0400 Subject: [PATCH 2/2] clean up --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 421c086..ffb09f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,5 @@ # Start with Ubuntu base image FROM ubuntu:14.04 -MAINTAINER Kai Arulkumaran # Install git, apt-add-repository and dependencies for iTorch RUN apt-get update && apt-get install -y \