Skip to content

Commit

Permalink
Dockerfile for OpenFace and OpenSMILE
Browse files Browse the repository at this point in the history
  • Loading branch information
benbuleong committed Aug 16, 2017
1 parent 15fe530 commit a7a8871
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 0 deletions.
69 changes: 69 additions & 0 deletions openface-cambridge
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
FROM ubuntu:16.04
MAINTAINER Ben Leong <[email protected]>

RUN apt-get update && \
apt-get install -y \
build-essential \
checkinstall \
clang-3.7 \
clang++-3.7 \
cmake \
git \
libavcodec-dev \
libavformat-dev \
libboost-all-dev \
libc++abi-dev \
libc++-dev \
libdc1394-22-dev \
libgtk2.0-dev \
libjasper-dev \
libjpeg-dev \
liblapack-dev \
libopenblas-dev \
libpng-dev \
libswscale-dev \
libtbb2 \
libtbb-dev \
libtiff-dev \
llvm \
pkg-config \
python-dev \
python-numpy \
sshfs \
unzip \
wget

RUN wget https://github.com/Itseez/opencv/archive/3.1.0.zip && \
unzip 3.1.0.zip -d /opt && \
cd /opt/opencv-3.1.0 && \
mkdir build && \
cd build && \
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D WITH_TBB=ON -D BUILD_SHARED_LIBS=OFF .. && \
make -j2 && \
make install

# successfully built using commit SHA f571af1c8414d1dc9df02d71c967126d7863662c
RUN cd /opt && \
git clone https://github.com/TadasBaltrusaitis/OpenFace.git && \
cd OpenFace && \
git reset --hard f571af1c8414d1dc9df02d71c967126d7863662c && \
mkdir build && \
cd build && \
cmake -D CMAKE_BUILD_TYPE=RELEASE .. && \
make

# install editors
RUN apt-get install -y \
emacs \
vim

# clean up
RUN rm 3.1.0.zip

# set working directory
WORKDIR /opt/OpenFace/build/bin

# copy feature extraction script over
COPY ./start_feature_extraction.sh /opt/OpenFace/build/bin
47 changes: 47 additions & 0 deletions opensmile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM ubuntu:16.04
MAINTAINER Ben Leong <[email protected]>

# install basic packages
RUN apt-get update && \
apt-get install -y \
automake \
build-essential \
checkinstall \
cmake \
git \
libtool \
pkg-config \
python-dev \
python-numpy \
sshfs \
unzip \
v4l-utils \
wget \
x264 \
yasm

# install all the relevant libs
RUN apt-get install -y \
libopencv-dev libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine2 libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev libtbb-dev libqt4-dev libgtk2.0-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libpng12-dev libtiff5-dev

# copy openSMILE tar.gz over
COPY ./opensmile-2.3.0.tar.gz ./2.4.13.3.zip /opt/

# unzip openSMILE and OpenCV
RUN cd /opt && \
tar -xvf opensmile-2.3.0.tar.gz && \
unzip 2.4.13.3.zip

# install OpenCV first
RUN mkdir -p /opt/opencv-2.4.13.3/release && cd /opt/opencv-2.4.13.3/release && \
cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=/usr/bin/g++ CMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_TBB=ON -DBUILD_NEW_PYTHON_SUPPORT=ON -DWITH_V4L=ON -DINSTALL_C_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON -DBUILD_EXAMPLES=ON -DWITH_QT=ON -DWITH_OPENGL=ON -DBUILD_FAT_JAVA_LIB=ON -DINSTALL_TO_MANGLED_PATHS=ON -DINSTALL_CREATE_DISTRIB=ON -DINSTALL_TESTS=ON -DENABLE_FAST_MATH=ON -DWITH_IMAGEIO=ON -DBUILD_SHARED_LIBS=OFF -DWITH_GSTREAMER=ON .. && \
# assuming most machines have 2 cores now
make all -j2 && \
make install

# install openSMILE
RUN cd /opt/opensmile-2.3.0/ && \
./buildWithPortAudio.sh -o /usr/local/lib && \
./buildStandalone.sh -o /usr/local/lib


0 comments on commit a7a8871

Please sign in to comment.