Skip to content

Instantly share code, notes, and snippets.

@takp
Last active April 25, 2018 02:27
Show Gist options
  • Save takp/e3e84ffc6872985134d343353951a83a to your computer and use it in GitHub Desktop.
Save takp/e3e84ffc6872985134d343353951a83a to your computer and use it in GitHub Desktop.
Dockerfile installing Torch, OpenCV and Lua
FROM jjanzic/docker-python3-opencv
RUN apt-get install lua
&& curl -R -O http://www.lua.org/ftp/lua-5.3.4.tar.gz \
&& tar zxf lua-5.3.4.tar.gz \
&& cd lua-5.3.4 \
&& make linux test \
&& make install
RUN apt-get install sudo
RUN cd \
&& git clone https://github.com/torch/distro.git ~/torch --recursive \
&& cd ~/torch \
&& bash install-deps \
&& ./install.sh
RUN sudo apt-get install build-essential \
&& sudo apt-get install -y cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev \
&& sudo apt-get install -y python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
RUN wget https://github.com/opencv/opencv/archive/3.1.0.tar.gz \
&& mv 3.1.0.tar.gz opencv-3.1.0.tar.gz \
&& tar zxf opencv-3.1.0.tar.gz \
&& cd opencv-3.1.0 \
&& mkdir build \
&& cd build \
&& cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local .. \
&& make -j7 \
&& make install
RUN luarocks install cv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment