Skip to content

Instantly share code, notes, and snippets.

@phelma
Last active February 24, 2016 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phelma/0c1ea9e3a3261931a0ea to your computer and use it in GitHub Desktop.
Save phelma/0c1ea9e3a3261931a0ea to your computer and use it in GitHub Desktop.
fbcunn-dockerfile
FROM kaixhin/cuda-torch:latest
MAINTAINER Phil Helm <philip.helm@omgplc.com>
ENV dir /root
# fbcunn https://github.com/facebook/fbcunn
# Install as https://github.com/facebook/fbcunn/blob/master/INSTALL.md
# Install Folly, fbthrift, thpp and fblualib
RUN sudo apt-get install -y \
git \
curl \
wget \
g++ \
automake \
autoconf \
autoconf-archive \
libtool \
libboost1.55-all-dev \
libevent-dev \
libdouble-conversion-dev \
libgoogle-glog-dev \
libgflags-dev \
liblz4-dev \
liblzma-dev \
libsnappy-dev \
make \
zlib1g-dev \
binutils-dev \
libjemalloc-dev \
libiberty-dev \
flex \
bison \
libkrb5-dev \
libsasl2-dev \
libnuma-dev \
pkg-config \
libssl-dev \
libedit-dev \
libmatio-dev \
libpython-dev \
libpython3-dev \
python-numpy
# Install Folly
WORKDIR ${dir}
RUN git clone -b v0.35.0 --depth 1 https://github.com/facebook/folly.git
WORKDIR ${dir}/folly/folly
RUN autoreconf -ivf
RUN ./configure
RUN make -j$(nproc)
RUN make install
RUN ldconfig
# Install fbthrift
WORKDIR ${dir}
RUN git clone -b v0.24.0 --depth 1 https://github.com/facebook/fbthrift.git
WORKDIR ${dir}/fbthrift/thrift
RUN autoreconf -ivf
RUN ./configure
RUN make -j$(nproc)
RUN sudo make install
# Install TH++
WORKDIR ${dir}
RUN git clone https://github.com/facebook/thpp
WORKDIR ${dir}/thpp/thpp
RUN ./build.sh
# Install fblualib
WORKDIR ${dir}
RUN git clone https://github.com/soumith/fblualib
WORKDIR ${dir}/fblualib/fblualib
RUN ./build.sh
# Install fbcunn
RUN git clone https://github.com/torch/nn && ( cd nn && git checkout getParamsByDevice && luarocks make rocks/nn-scm-1.rockspec )
RUN git clone https://github.com/facebook/fbtorch.git && ( cd fbtorch && luarocks make rocks/fbtorch-scm-1.rockspec )
RUN git clone https://github.com/facebook/fbnn.git && ( cd fbnn && luarocks make rocks/fbnn-scm-1.rockspec )
RUN git clone https://github.com/facebook/fbcunn.git && ( cd fbcunn && luarocks make rocks/fbcunn-scm-1.rockspec )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment