From d1f53269bbb27d1e3fcbea24e36acb8408d1b20b Mon Sep 17 00:00:00 2001 From: Rui Lopes Date: Thu, 3 Mar 2016 12:50:54 +0000 Subject: [PATCH] Add Dockerfile. --- Dockerfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1fd2557 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +# docker build -t neural-style . +# mkdir /tmp/neural-style-host +# docker run --rm -i -t -v /tmp/neural-style-host:/host neural-style +# cd ~/neural-style +# th neural_style.lua -gpu -1 -style_image examples/inputs/starry_night.jpg -content_image examples/inputs/hoovertowernight.jpg -num_iterations 500 -image_size 760 -output_image /host/out.png + +FROM ubuntu:15.10 + +# install dependencies. +RUN cd ~ && \ + apt-get update && apt-get upgrade -y && \ + apt-get install -y curl wget sudo libprotobuf-dev protobuf-compiler && \ + curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash && \ + git clone https://github.com/torch/distro.git ~/torch --recursive && \ + cd ~/torch && ./install.sh && . ~/.profile && \ + luarocks install loadcaffe && \ + apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +# install neural-style from the local directory. +ADD . /root/neural-style/ +RUN cd ~/neural-style && \ + sh models/download_models.sh + +VOLUME ["/host"]