From 381df4a9af94356b159d8d43b08b76f64df2084b Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 22 Nov 2017 16:04:05 -0500 Subject: [PATCH 01/26] Updating the README and adding the docker directory --- README.md | 93 ++++++++++++++++++++++++++-------------- docker/Dockerfile-CentOS | 86 +++++++++++++++++++++++++++++++++++++ docker/Dockerfile-Ubuntu | 87 +++++++++++++++++++++++++++++++++++++ 3 files changed, 235 insertions(+), 31 deletions(-) create mode 100644 docker/Dockerfile-CentOS create mode 100644 docker/Dockerfile-Ubuntu diff --git a/README.md b/README.md index 72dac6d..ca4ef0d 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ -#Sample Apps for Affdex SDK for Windows and Linux +# Sample Apps for Affdex SDK for Windows and Linux -Welcome to our repository on GitHub! Here you will find example code to get you started with our Affdex Linux SDK 3.2, Affdex Windows SDK 3.4 and begin emotion-enabling you own app! Documentation for the SDKs is available on the Affectiva's Developer Portal. +Welcome to our repository on GitHub! Here you will find example code to get you started with our Affdex Linux SDK 4.0.0, Affdex Windows SDK 3.4 and begin emotion-enabling you own app! Documentation for the SDKs is available on the Affectiva's Developer Portal. -*Build Status* +Build Status +------------- - Windows: [![Build status](https://ci.appveyor.com/api/projects/status/pn2y9h8a3nnkiw41?svg=true)] (https://ci.appveyor.com/project/ahamino/win-sdk-samples) - Ubuntu: [![Build Status](https://travis-ci.org/Affectiva/cpp-sdk-samples.svg?branch=master)](https://travis-ci.org/Affectiva/cpp-sdk-samples) @@ -10,20 +11,20 @@ Welcome to our repository on GitHub! Here you will find example code to get you Dependencies ------------ -*Windows* +##### Windows - Affdex SDK 3.4 (64 bit) - Visual Studio 2013 or higher -*Linux* -- Ubuntu 14.04 or CentOS 7 -- Affdex SDK 3.2 -- CMake 2.8 or higher -- GCC 4.8 +##### Linux +- Ubuntu 16.04 with GCC v5.4.1 +- CentOS 7 with GCC v4.8.x +- Affdex SDK 4.0.0 +- CMake 3.5 or higher -*Additional dependencies* +##### Additional dependencies - OpenCV 2.4 -- Boost 1.59 +- Boost 1.63 - libuuid - libcurl - libopenssl @@ -33,17 +34,47 @@ Installation - Download Affdex SDK [from here](http://developer.affectiva.com/downloads) -*Windows* +##### Windows - Install the SDK using MSI installer. - The additional dependencies get installed automatically by NuGet. +##### Linux + +*Installation Guide for CMake v3.5 and Boost v1.63 for CentOS 7 and Ubuntu 16.04* + +- Boost + +``` +$ wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz +$ tar -xzvf boost_1_63_0.tar.gz -C $HOME +$ cd boost_1_63_0 +$ ./bootstrap.sh +$ sudo ./b2 -j $(nproc) cxxflags=-fPIC threading=multi runtime-link=shared \ + --with-log --with-serialization --with-system --with-date_time \ + --with-filesystem --with-regex --with-timer --with-chrono --with-thread \ + --with-program_options install +``` + +- CMAKE + +``` +$ wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz \ +$ tar -xvf cmake-3.8.1.tar.gz && rm cmake-3.8.1.tar.gz +$ cd $SRC_DIR/cmake-3.8.1/ +$ ./bootstrap --system-curl && \ + make -j$(nproc) && \ + make install && \ + rm -rf $SRC_DIR/cmake-3.8.1 + +``` + *Ubuntu* ```bashrc -sudo apt-get install build-essential libopencv-dev libboost1.55-all-dev libcurl4-openssl uuid-dev cmake -wget https://download.affectiva.com/linux/affdex-cpp-sdk-3.2-20-ubuntu-xenial-xerus-64bit.tar.gz +sudo apt-get install build-essential libopencv-dev libcurl4-openssl uuid-dev +wget https://download.affectiva.com/linux/gcc-5.4/affdex-cpp-sdk-4.0-75-ubuntu-xenial-xerus-x86_64bit.tar.gz mkdir $HOME/affdex-sdk -tar -xzvf affdex-cpp-sdk-3.2-20-ubuntu-xenial-xerus-64bit.tar.gz -C $HOME/affdex-sdk +tar -xzvf affdex-cpp-sdk-4.0-75-ubuntu-xenial-xerus-x86_64bit.tar.gz -C $HOME/affdex-sdk export AFFDEX_DATA_DIR=$HOME/affdex-sdk/data git clone https://github.com/Affectiva/cpp-sdk-samples.git $HOME/sdk-samples mkdir $HOME/build @@ -56,22 +87,17 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/affdex-sdk/lib *CentOS* ```bashrc -sudo yum install libcurl-devel.x86_64 libuuid-devel.x86_64 opencv-devel cmake.x86_64 -wget https://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/download -O boost_1_55_0.tar.gz -tar -xzvf boost_1_55_0.tar.gz -C $HOME -cd boost_1_55 -./bootstrap.sh --with-libraries=log,serialization,system,date_time,filesystem,regex,timer,chrono,thread,program_options -sudo ./b2 link=static install -wget https://download.affectiva.com/linux/affdex-cpp-sdk-3.2-2893-centos-7-64bit.tar.gz -mkdir $HOME/affdex-sdk -tar -xzvf affdex-cpp-sdk-3.2-2893-centos-7-64bit.tar.gz -C $HOME/affdex-sdk -export AFFDEX_DATA_DIR=$HOME/affdex-sdk/data -git clone https://github.com/Affectiva/cpp-sdk-samples.git $HOME/sdk-samples -mkdir $HOME/build -cd $HOME/build -cmake -DOpenCV_DIR=/usr/ -DBOOST_ROOT=/usr/ -DAFFDEX_DIR=$HOME/affdex-sdk $HOME/sdk-samples -make -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/affdex-sdk/lib +$ sudo yum install libcurl-devel.x86_64 libuuid-devel.x86_64 opencv-devel +$ wget https://download.affectiva.com/linux/centos-4.8/affdex-cpp-sdk-4.0-2941-centos-7-x86_64bit.tar.gz +$ mkdir $HOME/affdex-sdk +$ tar -xzvf affdex-cpp-sdk-4.0-2941-centos-7-x86_64bit.tar.gz -C $HOME/affdex-sdk +$ export AFFDEX_DATA_DIR=$HOME/affdex-sdk/data +$ git clone https://github.com/Affectiva/cpp-sdk-samples.git $HOME/sdk-samples +$ mkdir $HOME/build +$ cd $HOME/build +$ cmake -DOpenCV_DIR=/usr/ -DBOOST_ROOT=/usr/ -DAFFDEX_DIR=$HOME/affdex-sdk $HOME/sdk-samples +$ make +$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/affdex-sdk/lib ``` OpenCV-webcam-demo (c++) @@ -113,3 +139,8 @@ The following command line arguments can be used to run it: For an example of how to use Affdex in a C# application .. please refer to [AffdexMe](https://github.com/affectiva/affdexme-win) + +Docker Build Instructions +------------------------- + +Please check out the Dockerfiles in the docker directory to follow the build and run steps to create and run the image. diff --git a/docker/Dockerfile-CentOS b/docker/Dockerfile-CentOS new file mode 100644 index 0000000..922c22e --- /dev/null +++ b/docker/Dockerfile-CentOS @@ -0,0 +1,86 @@ +# A Docker image to be used for building the sample applications for the Linux SDK CentOS7 +# +# build: +# $ docker build --file=Dockerfile-CentOS --tag=v4.0.0:affdex . +# +# the result will be an image that has the tar'ed artifact of the sample app and all of its dependencies installed +# +# run interactively: +# $ docker run -it --rm v4.0.0:affdex + +FROM affectiva/centos7-updates +MAINTAINER Affectiva Development (affdexdev@affectiva.com) + +# Repo for latest git 2.x +RUN yum remove -y git +RUN yum install -y http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm + +RUN yum install -y gcc \ + gcc-c++ \ + jhead \ + curl-devel \ + openssl-devel \ + zlib-devel \ + wget \ + git \ + opencv-devel \ + make + +ENV SRC_DIR /opt/src +ENV BUILD_DIR /opt/build +ENV ARTIFACT_DIR /opt/testapp-artifact + +################################# +###### Clone Sample App Repo ###### +################################# + +RUN git clone https://github.com/Affectiva/cpp-sdk-samples.git $SRC_DIR/sdk-samples + +#### CMAKE #### +WORKDIR $SRC_DIR +RUN wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz \ + && tar -xvf cmake-3.8.1.tar.gz && rm cmake-3.8.1.tar.gz +RUN cd $SRC_DIR/cmake-3.8.1/ && \ + ./bootstrap --system-curl && \ + make -j$(nproc) && \ + make install && \ + rm -rf $SRC_DIR/cmake-3.8.1 + +#### BOOST #### +WORKDIR $SRC_DIR +RUN wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz && \ + tar -xvf boost_1_63_0.tar.gz && \ + rm boost_1_63_0.tar.gz && \ + cd $SRC_DIR/boost_1_63_0 && \ + ./bootstrap.sh &&\ + ./b2 -j $(nproc) cxxflags=-fPIC threading=multi runtime-link=shared \ + --with-log --with-serialization --with-system --with-date_time \ + --with-filesystem --with-regex --with-timer --with-chrono --with-thread \ + --with-program_options install && \ + rm -rf $SRC_DIR/boost_1_63_0 + +#### DOWNLOAD Affdex CentOS SDK #### +WORKDIR $SRC_DIR +RUN wget https://download.affectiva.com/linux/centos-4.8/affdex-cpp-sdk-4.0-2941-centos-7-x86_64bit.tar.gz &&\ + mkdir -p affdex-sdk && \ + tar -xf affdex-cpp* -C affdex-sdk && \ + rm -r $SRC_DIR/affdex-cpp-sdk-4.0-2941-centos-7-x86_64bit.tar.gz + +#### BUILD SAMPLE APP #### +RUN mkdir -p $BUILD_DIR &&\ + cd $BUILD_DIR &&\ + cmake -DOpenCV_DIR=/usr/ -DBOOST_ROOT=/usr/ -DAFFDEX_DIR=$SRC_DIR/affdex-sdk $SRC_DIR/sdk-samples &&\ + make -j$(nproc) + +## CREATE THE ARTIFACT +WORKDIR $ARTIFACT_DIR +RUN mkdir -p $ARTIFACT_DIR &&\ + mv $SRC_DIR/affdex-sdk/ . &&\ + mv $BUILD_DIR . &&\ + tar -cvf ../testapp-artifact.tar.gz . + +ENV AFFDEX_DATA_DIR $ARTIFACT_DIR/affdex-sdk/data +ENV LD_LIBRARY_PATH $ARTIFACT_DIR/affdex-sdk/lib +ENV LD_PRELOAD /usr/lib64/libopencv_core.so + +WORKDIR /opt diff --git a/docker/Dockerfile-Ubuntu b/docker/Dockerfile-Ubuntu new file mode 100644 index 0000000..2df9cfa --- /dev/null +++ b/docker/Dockerfile-Ubuntu @@ -0,0 +1,87 @@ +# A Docker image to be used for building the sample applications for the Linux SDK Ubuntu 16.04 +# +# build: +# $ docker build --file=Dockerfile-Ubuntu --tag=v4.0.0:affdex . +# +# the result will be an image that has the tar'ed artifact of the sample app and all of its dependencies installed +# +# run interactively: +# $ docker run -it --rm v4.0.0:affdex + +FROM ubuntu:16.04 + +# Get dependencies +RUN apt-get update && apt-get install -y software-properties-common +# Repo for latest git 2.x +RUN add-apt-repository -y ppa:git-core/ppa && apt-get update && apt-get install -y git + +RUN apt-get update && apt-get install -y \ + libcurl4-openssl-dev \ + libssl-dev \ + bc \ + gfortran \ + unzip \ + wget \ + g++ \ + make \ + libopencv-dev + +ENV SRC_DIR /opt/src +ENV BUILD_DIR /opt/build +ENV ARTIFACT_DIR /opt/testapp-artifact + +################################# +###### Clone Sample App Repo ###### +################################# + +RUN git clone https://github.com/Affectiva/cpp-sdk-samples.git $SRC_DIR/sdk-samples + +#### CMAKE #### +WORKDIR $SRC_DIR +RUN wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz \ + && tar -xvf cmake-3.8.1.tar.gz && rm cmake-3.8.1.tar.gz +RUN cd $SRC_DIR/cmake-3.8.1/ && \ + ./bootstrap --system-curl && \ + make -j$(nproc) && \ + make install && \ + rm -rf $SRC_DIR/cmake-3.8.1 + +#### BOOST #### +WORKDIR $SRC_DIR +RUN wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz && \ + tar -xvf boost_1_63_0.tar.gz && \ + rm boost_1_63_0.tar.gz && \ + cd $SRC_DIR/boost_1_63_0 && \ + ./bootstrap.sh &&\ + ./b2 -j $(nproc) cxxflags=-fPIC threading=multi runtime-link=shared \ + --with-log --with-serialization --with-system --with-date_time \ + --with-filesystem --with-regex --with-timer --with-chrono --with-thread \ + --with-program_options \ + install && \ + rm -rf $SRC_DIR/boost_1_63_0 + +#### DOWNLOAD Affdex Ubuntu SDK #### +WORKDIR $SRC_DIR +RUN wget https://download.affectiva.com/linux/gcc-5.4/affdex-cpp-sdk-4.0-75-ubuntu-xenial-xerus-x86_64bit.tar.gz &&\ + mkdir -p affdex-sdk && \ + tar -xf affdex-cpp* -C affdex-sdk && \ + rm -r $SRC_DIR/affdex-cpp-sdk-* + +#### BUILD SAMPLE APP #### +RUN mkdir -p $BUILD_DIR &&\ + cd $BUILD_DIR &&\ + cmake -DOpenCV_DIR=/usr/ -DBOOST_ROOT=/usr/ -DAFFDEX_DIR=$SRC_DIR/affdex-sdk $SRC_DIR/sdk-samples &&\ + make -j$(nproc) + +## CREATE THE ARTIFACT +WORKDIR $ARTIFACT_DIR +RUN mkdir -p $ARTIFACT_DIR &&\ + mv $SRC_DIR/affdex-sdk/ . &&\ + mv $BUILD_DIR . &&\ + tar -cvf ../testapp-artifact.tar.gz . + +ENV AFFDEX_DATA_DIR $ARTIFACT_DIR/affdex-sdk/data +ENV LD_LIBRARY_PATH $ARTIFACT_DIR/affdex-sdk/lib +ENV LD_PRELOAD /usr/lib/x86_64-linux-gnu/libopencv_core.so.2.4 + +WORKDIR /opt From edd1fdf63756aa68e58ddca87333129a7d1f2f7f Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 22 Nov 2017 16:22:31 -0500 Subject: [PATCH 02/26] Updating the README and travis config --- .travis.yml | 21 +++++++++++++++++++-- README.md | 8 +++++--- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 06e4344..2fcaae3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,25 @@ language: cpp compiler: - gcc-4.8 before_script: - - sudo apt-get install -y gcc-4.8 g++-4.8 libopencv-dev libboost1.55-all-dev cmake - - wget https://download.affectiva.com/linux/affdex-cpp-sdk-3.1-396-linux-64bit.tar.gz -O /tmp/affdex-sdk.tar.gz + - sudo apt-get install -y gcc-5.4 g++-5.4 libopencv-dev make libcurl4-openssl-dev libssl-dev + - wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz -O /tmp/cmake.tar.gz + - mkdir /tmp/cmake + - tar -xvf cmake.tar.gz -C /tmp/cmake + - cd /tmp/cmake && \ + ./bootstrap --system-curl && \ + make -j$(nproc) && \ + make install + - wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz -O /tmp/boost.tar.gz + - mkdir /tmp/boost + - tar -xvf boost.tar.gz -C /tmp/boost + - cd /tmp/boost && \ + ./bootstrap.sh &&\ + ./b2 -j $(nproc) cxxflags=-fPIC threading=multi runtime-link=shared \ + --with-log --with-serialization --with-system --with-date_time \ + --with-filesystem --with-regex --with-timer --with-chrono --with-thread \ + --with-program_options \ + install + - wget https://download.affectiva.com/linux/gcc-5.4/affdex-cpp-sdk-4.0-75-ubuntu-xenial-xerus-x86_64bit.tar.gz -O /tmp/affdex-sdk.tar.gz - mkdir /tmp/affdex-sdk - tar -xzvf /tmp/affdex-sdk.tar.gz -C /tmp/affdex-sdk - mkdir build diff --git a/README.md b/README.md index ca4ef0d..3053af2 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,9 @@ Dependencies Installation ------------ -- Download Affdex SDK [from here](http://developer.affectiva.com/downloads) +- Download Affdex SDK for Linux [from here](https://affectiva.readme.io/docs/getting-started-with-the-affectiva-sdk-for-linux#section-1-download-and-extract-the-sdk-archive) +- - Download Affdex SDK for Windows [from here](https://affectiva.readme.io/docs/getting-started-with-the-emotion-sdk-for-windows#section-1-download-and-run-the-sdk-installer) + ##### Windows - Install the SDK using MSI installer. @@ -123,7 +125,7 @@ The following command line arguments can be used to run it: Video-demo (c++) ---------- -Project for demoing the Windows SDK [VideoDetector class](http://developer.affectiva.com/v3_2/cpp/analyze-video/) and [PhotoDetector class](http://developer.affectiva.com/v3_2/cpp/analyze-photo/). It processs video or image files, displays the emotion metrics and exports the results in a csv file. +Project for demoing the Windows SDK [VideoDetector class](http://developer.affectiva.com/v3_2/cpp/analyze-video/) and [PhotoDetector class](http://developer.affectiva.com/v3_2/cpp/analyze-photo/). It process video or image files, displays the emotion metrics and exports the results in a csv file. The following command line arguments can be used to run it: @@ -143,4 +145,4 @@ For an example of how to use Affdex in a C# application .. please refer to [Affd Docker Build Instructions ------------------------- -Please check out the Dockerfiles in the docker directory to follow the build and run steps to create and run the image. +The Dockerfile's are located in the docker directory. To build the docker image please refer to the files for instructions. From dcb2d3c1d2ece728006514daf680538794dc6606 Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 22 Nov 2017 16:24:00 -0500 Subject: [PATCH 03/26] Fixup --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3053af2..36aaf94 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Installation ------------ - Download Affdex SDK for Linux [from here](https://affectiva.readme.io/docs/getting-started-with-the-affectiva-sdk-for-linux#section-1-download-and-extract-the-sdk-archive) -- - Download Affdex SDK for Windows [from here](https://affectiva.readme.io/docs/getting-started-with-the-emotion-sdk-for-windows#section-1-download-and-run-the-sdk-installer) +- Download Affdex SDK for Windows [from here](https://affectiva.readme.io/docs/getting-started-with-the-emotion-sdk-for-windows#section-1-download-and-run-the-sdk-installer) ##### Windows From 02fdfced6c14b936ed984d8b5330193c12346383 Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 22 Nov 2017 16:28:39 -0500 Subject: [PATCH 04/26] Fixup --- .travis.yml | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2fcaae3..6a95ec1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ dist: trusty language: cpp compiler: - - gcc-4.8 + - gcc-5.4 before_script: - sudo apt-get install -y gcc-5.4 g++-5.4 libopencv-dev make libcurl4-openssl-dev libssl-dev - wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz -O /tmp/cmake.tar.gz diff --git a/README.md b/README.md index 36aaf94..bb00d34 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Installation ##### Linux -*Installation Guide for CMake v3.5 and Boost v1.63 for CentOS 7 and Ubuntu 16.04* +*Installation Guide for dependencies CMake v3.8.1 and Boost v1.63 for CentOS 7 and Ubuntu 16.04* - Boost @@ -70,7 +70,7 @@ $ ./bootstrap --system-curl && \ ``` -*Ubuntu* +- Building the SDK on Ubuntu 16.04 ```bashrc sudo apt-get install build-essential libopencv-dev libcurl4-openssl uuid-dev @@ -86,7 +86,7 @@ make export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/affdex-sdk/lib ``` -*CentOS* +- Building the SDK on CentOS 7 ```bashrc $ sudo yum install libcurl-devel.x86_64 libuuid-devel.x86_64 opencv-devel From b0d0e64885f4b7357839f20222d3b748e643fee6 Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 22 Nov 2017 16:30:53 -0500 Subject: [PATCH 05/26] Fixup --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6a95ec1..bf49446 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ dist: trusty language: cpp compiler: - - gcc-5.4 + - gcc-5 before_script: - - sudo apt-get install -y gcc-5.4 g++-5.4 libopencv-dev make libcurl4-openssl-dev libssl-dev + - sudo apt-get install -y gcc-5 g++-5 libopencv-dev make libcurl4-openssl-dev libssl-dev - wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz -O /tmp/cmake.tar.gz - mkdir /tmp/cmake - tar -xvf cmake.tar.gz -C /tmp/cmake From 06e756f44dd69678dd08a26480d90885d7d0a80a Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 22 Nov 2017 16:44:53 -0500 Subject: [PATCH 06/26] Updating the config for building on travis --- .travis.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index bf49446..c3bae6b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,18 @@ dist: trusty +sudo: require language: cpp -compiler: - - gcc-5 +compiler: gcc + +before_install: + # C++11 + - sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test + - sudo apt-get update -qq + +install: + # C++11 + - sudo apt-get install -qq gcc-5 g++-5 libopencv-dev libcurl4-openssl-dev libssl-dev + before_script: - - sudo apt-get install -y gcc-5 g++-5 libopencv-dev make libcurl4-openssl-dev libssl-dev - wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz -O /tmp/cmake.tar.gz - mkdir /tmp/cmake - tar -xvf cmake.tar.gz -C /tmp/cmake @@ -27,5 +36,6 @@ before_script: - mkdir build - cd build - cmake -DBOOST_ROOT=/usr/ -DOpenCV_DIR=/usr/ -DAFFDEX_DIR=/tmp/affdex-sdk .. + script: - make From 51270ea2e4b89376202fece0e15517db3d681d4a Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 22 Nov 2017 16:51:07 -0500 Subject: [PATCH 07/26] Updating the install location for cmake and boost in travis yml --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c3bae6b..41c4bd1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,14 +15,14 @@ install: before_script: - wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz -O /tmp/cmake.tar.gz - mkdir /tmp/cmake - - tar -xvf cmake.tar.gz -C /tmp/cmake + - tar -xvf /tmp/cmake.tar.gz -C /tmp/cmake - cd /tmp/cmake && \ ./bootstrap --system-curl && \ make -j$(nproc) && \ make install - wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz -O /tmp/boost.tar.gz - mkdir /tmp/boost - - tar -xvf boost.tar.gz -C /tmp/boost + - tar -xvf /tmp/boost.tar.gz -C /tmp/boost - cd /tmp/boost && \ ./bootstrap.sh &&\ ./b2 -j $(nproc) cxxflags=-fPIC threading=multi runtime-link=shared \ From 822d3d9a7c6618ee58d443f1ffa155c15a04f65a Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 22 Nov 2017 17:09:30 -0500 Subject: [PATCH 08/26] Updating travis yml to silence the log and adding sudo when installing boost and cmake --- .travis.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 41c4bd1..4cc3874 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,19 +17,18 @@ before_script: - mkdir /tmp/cmake - tar -xvf /tmp/cmake.tar.gz -C /tmp/cmake - cd /tmp/cmake && \ - ./bootstrap --system-curl && \ - make -j$(nproc) && \ - make install + ./bootstrap --system-curl > /dev/null 2>&1 && \ + make -j$(nproc) > /dev/null 2>&1 && \ + sudo make install > /dev/null 2>&1 - wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz -O /tmp/boost.tar.gz - mkdir /tmp/boost - tar -xvf /tmp/boost.tar.gz -C /tmp/boost - cd /tmp/boost && \ - ./bootstrap.sh &&\ - ./b2 -j $(nproc) cxxflags=-fPIC threading=multi runtime-link=shared \ + ./bootstrap.sh > /dev/null 2>&1 &&\ + sudo ./b2 -j $(nproc) cxxflags=-fPIC threading=multi runtime-link=shared \ --with-log --with-serialization --with-system --with-date_time \ --with-filesystem --with-regex --with-timer --with-chrono --with-thread \ - --with-program_options \ - install + --with-program_options install > /dev/null 2>&1 - wget https://download.affectiva.com/linux/gcc-5.4/affdex-cpp-sdk-4.0-75-ubuntu-xenial-xerus-x86_64bit.tar.gz -O /tmp/affdex-sdk.tar.gz - mkdir /tmp/affdex-sdk - tar -xzvf /tmp/affdex-sdk.tar.gz -C /tmp/affdex-sdk From 0a2cb72a7d2cb3df1f242663a34a2253908022d1 Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 22 Nov 2017 17:22:02 -0500 Subject: [PATCH 09/26] Updating travis yml to silence the log and adding sudo when installing boost and cmake --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4cc3874..390f53b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,19 +16,19 @@ before_script: - wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz -O /tmp/cmake.tar.gz - mkdir /tmp/cmake - tar -xvf /tmp/cmake.tar.gz -C /tmp/cmake - - cd /tmp/cmake && \ - ./bootstrap --system-curl > /dev/null 2>&1 && \ - make -j$(nproc) > /dev/null 2>&1 && \ - sudo make install > /dev/null 2>&1 + - cd /tmp/cmake + - ./bootstrap --system-curl + - make -j$(nproc) 2> /dev/null + - sudo make install 2> /dev/null - wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz -O /tmp/boost.tar.gz - mkdir /tmp/boost - tar -xvf /tmp/boost.tar.gz -C /tmp/boost - - cd /tmp/boost && \ - ./bootstrap.sh > /dev/null 2>&1 &&\ - sudo ./b2 -j $(nproc) cxxflags=-fPIC threading=multi runtime-link=shared \ + - cd /tmp/boost + - ./bootstrap.sh + - sudo ./b2 -j $(nproc) cxxflags=-fPIC threading=multi runtime-link=shared \ --with-log --with-serialization --with-system --with-date_time \ --with-filesystem --with-regex --with-timer --with-chrono --with-thread \ - --with-program_options install > /dev/null 2>&1 + --with-program_options install 2> /dev/null - wget https://download.affectiva.com/linux/gcc-5.4/affdex-cpp-sdk-4.0-75-ubuntu-xenial-xerus-x86_64bit.tar.gz -O /tmp/affdex-sdk.tar.gz - mkdir /tmp/affdex-sdk - tar -xzvf /tmp/affdex-sdk.tar.gz -C /tmp/affdex-sdk From 9e7e896cd06f7f60b346917cce03b5a543d4cea3 Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 22 Nov 2017 17:40:50 -0500 Subject: [PATCH 10/26] Fixup --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 390f53b..5b262d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,14 +15,14 @@ install: before_script: - wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz -O /tmp/cmake.tar.gz - mkdir /tmp/cmake - - tar -xvf /tmp/cmake.tar.gz -C /tmp/cmake + - tar -xzvf /tmp/cmake.tar.gz -C /tmp/cmake - cd /tmp/cmake - ./bootstrap --system-curl - make -j$(nproc) 2> /dev/null - sudo make install 2> /dev/null - wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz -O /tmp/boost.tar.gz - mkdir /tmp/boost - - tar -xvf /tmp/boost.tar.gz -C /tmp/boost + - tar -xzvf /tmp/boost.tar.gz -C /tmp/boost - cd /tmp/boost - ./bootstrap.sh - sudo ./b2 -j $(nproc) cxxflags=-fPIC threading=multi runtime-link=shared \ From 415d876b03c01932021eac57f8641dd9d1c93c63 Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 22 Nov 2017 17:47:15 -0500 Subject: [PATCH 11/26] Fixup --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5b262d1..f9eb971 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ before_script: - wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz -O /tmp/cmake.tar.gz - mkdir /tmp/cmake - tar -xzvf /tmp/cmake.tar.gz -C /tmp/cmake - - cd /tmp/cmake + - cd /tmp/cmake/cmake-3.8.1 - ./bootstrap --system-curl - make -j$(nproc) 2> /dev/null - sudo make install 2> /dev/null From 944b29f17cd0238c8dd22c734592f1fd72570bb1 Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 29 Nov 2017 12:11:18 -0500 Subject: [PATCH 12/26] Updating the verbosity and getting rid of the logs --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index f9eb971..7502196 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,14 +15,14 @@ install: before_script: - wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz -O /tmp/cmake.tar.gz - mkdir /tmp/cmake - - tar -xzvf /tmp/cmake.tar.gz -C /tmp/cmake + - tar -xzf /tmp/cmake.tar.gz -C /tmp/cmake - cd /tmp/cmake/cmake-3.8.1 - ./bootstrap --system-curl - - make -j$(nproc) 2> /dev/null - - sudo make install 2> /dev/null + - make -j$(nproc) > /dev/null + - sudo make install > /dev/null - wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz -O /tmp/boost.tar.gz - mkdir /tmp/boost - - tar -xzvf /tmp/boost.tar.gz -C /tmp/boost + - tar -xzf /tmp/boost.tar.gz -C /tmp/boost - cd /tmp/boost - ./bootstrap.sh - sudo ./b2 -j $(nproc) cxxflags=-fPIC threading=multi runtime-link=shared \ @@ -31,7 +31,7 @@ before_script: --with-program_options install 2> /dev/null - wget https://download.affectiva.com/linux/gcc-5.4/affdex-cpp-sdk-4.0-75-ubuntu-xenial-xerus-x86_64bit.tar.gz -O /tmp/affdex-sdk.tar.gz - mkdir /tmp/affdex-sdk - - tar -xzvf /tmp/affdex-sdk.tar.gz -C /tmp/affdex-sdk + - tar -xzf /tmp/affdex-sdk.tar.gz -C /tmp/affdex-sdk - mkdir build - cd build - cmake -DBOOST_ROOT=/usr/ -DOpenCV_DIR=/usr/ -DAFFDEX_DIR=/tmp/affdex-sdk .. From 234e20f41ce647f70d62a6813a3bf062e359979e Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 29 Nov 2017 12:23:07 -0500 Subject: [PATCH 13/26] Fixup for looking up boost --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7502196..dc59a36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ before_script: - wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz -O /tmp/boost.tar.gz - mkdir /tmp/boost - tar -xzf /tmp/boost.tar.gz -C /tmp/boost - - cd /tmp/boost + - cd /tmp/boost/boost_1_63_0 - ./bootstrap.sh - sudo ./b2 -j $(nproc) cxxflags=-fPIC threading=multi runtime-link=shared \ --with-log --with-serialization --with-system --with-date_time \ From 7d121fd074ed4c12f371a2b1e27e9e796c09aa70 Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 29 Nov 2017 12:35:56 -0500 Subject: [PATCH 14/26] Fixup for compiling boost --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dc59a36..5617f7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ before_script: - sudo ./b2 -j $(nproc) cxxflags=-fPIC threading=multi runtime-link=shared \ --with-log --with-serialization --with-system --with-date_time \ --with-filesystem --with-regex --with-timer --with-chrono --with-thread \ - --with-program_options install 2> /dev/null + --with-program_options install > /dev/null - wget https://download.affectiva.com/linux/gcc-5.4/affdex-cpp-sdk-4.0-75-ubuntu-xenial-xerus-x86_64bit.tar.gz -O /tmp/affdex-sdk.tar.gz - mkdir /tmp/affdex-sdk - tar -xzf /tmp/affdex-sdk.tar.gz -C /tmp/affdex-sdk From ff5ec135c74a4f1998077887dff077fa2917d4e0 Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 29 Nov 2017 12:46:45 -0500 Subject: [PATCH 15/26] Fixup --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5617f7c..122c230 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ before_script: - sudo ./b2 -j $(nproc) cxxflags=-fPIC threading=multi runtime-link=shared \ --with-log --with-serialization --with-system --with-date_time \ --with-filesystem --with-regex --with-timer --with-chrono --with-thread \ - --with-program_options install > /dev/null + --with-program_options install - wget https://download.affectiva.com/linux/gcc-5.4/affdex-cpp-sdk-4.0-75-ubuntu-xenial-xerus-x86_64bit.tar.gz -O /tmp/affdex-sdk.tar.gz - mkdir /tmp/affdex-sdk - tar -xzf /tmp/affdex-sdk.tar.gz -C /tmp/affdex-sdk From 9b91119224db9c0c18e463b4d55f615f0d38c7c4 Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 29 Nov 2017 13:02:59 -0500 Subject: [PATCH 16/26] Travis does not like / --- .travis.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 122c230..8423c9d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,10 +25,7 @@ before_script: - tar -xzf /tmp/boost.tar.gz -C /tmp/boost - cd /tmp/boost/boost_1_63_0 - ./bootstrap.sh - - sudo ./b2 -j $(nproc) cxxflags=-fPIC threading=multi runtime-link=shared \ - --with-log --with-serialization --with-system --with-date_time \ - --with-filesystem --with-regex --with-timer --with-chrono --with-thread \ - --with-program_options install + - sudo ./b2 -j $(nproc) cxxflags=-fPIC threading=multi runtime-link=shared --with-log --with-serialization --with-system --with-date_time --with-filesystem --with-regex --with-timer --with-chrono --with-thread --with-program_options install > /dev/null - wget https://download.affectiva.com/linux/gcc-5.4/affdex-cpp-sdk-4.0-75-ubuntu-xenial-xerus-x86_64bit.tar.gz -O /tmp/affdex-sdk.tar.gz - mkdir /tmp/affdex-sdk - tar -xzf /tmp/affdex-sdk.tar.gz -C /tmp/affdex-sdk From e29740ed54f4b5c3b77499fcbb7123733ea22e76 Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 29 Nov 2017 13:48:52 -0500 Subject: [PATCH 17/26] Updating the source directory for cmake --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8423c9d..c5734f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,9 +29,9 @@ before_script: - wget https://download.affectiva.com/linux/gcc-5.4/affdex-cpp-sdk-4.0-75-ubuntu-xenial-xerus-x86_64bit.tar.gz -O /tmp/affdex-sdk.tar.gz - mkdir /tmp/affdex-sdk - tar -xzf /tmp/affdex-sdk.tar.gz -C /tmp/affdex-sdk - - mkdir build - - cd build - - cmake -DBOOST_ROOT=/usr/ -DOpenCV_DIR=/usr/ -DAFFDEX_DIR=/tmp/affdex-sdk .. + - mkdir $HOME/build + - cd $HOME/build + - cmake -DBOOST_ROOT=/usr/ -DOpenCV_DIR=/usr/ -DAFFDEX_DIR=/tmp/affdex-sdk $HOME/cpp-sdk-samples script: - make From 4fe800fe50f24e61ab6d77b6869e83feae2dd309 Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 29 Nov 2017 14:13:31 -0500 Subject: [PATCH 18/26] Updating the BUILD_DIR --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c5734f1..a4dfefa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,8 @@ install: - sudo apt-get install -qq gcc-5 g++-5 libopencv-dev libcurl4-openssl-dev libssl-dev before_script: + - mkdir build + - export BUILD_DIR=$PWD/build - wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz -O /tmp/cmake.tar.gz - mkdir /tmp/cmake - tar -xzf /tmp/cmake.tar.gz -C /tmp/cmake @@ -29,9 +31,8 @@ before_script: - wget https://download.affectiva.com/linux/gcc-5.4/affdex-cpp-sdk-4.0-75-ubuntu-xenial-xerus-x86_64bit.tar.gz -O /tmp/affdex-sdk.tar.gz - mkdir /tmp/affdex-sdk - tar -xzf /tmp/affdex-sdk.tar.gz -C /tmp/affdex-sdk - - mkdir $HOME/build - - cd $HOME/build - - cmake -DBOOST_ROOT=/usr/ -DOpenCV_DIR=/usr/ -DAFFDEX_DIR=/tmp/affdex-sdk $HOME/cpp-sdk-samples + - cd $BUILD_DIR + - cmake -DBOOST_ROOT=/usr/ -DOpenCV_DIR=/usr/ -DAFFDEX_DIR=/tmp/affdex-sdk .. script: - make From f402c6ba34e36c8e1bcd186c479bd6cd9de55743 Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 29 Nov 2017 14:40:36 -0500 Subject: [PATCH 19/26] Updating compiler to v5.4 --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index a4dfefa..10e4a6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,8 @@ install: before_script: - mkdir build - export BUILD_DIR=$PWD/build + - export CC=/usr/local/bin/gcc-5 + - export CXX=/usr/local/bin/g++-5 - wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz -O /tmp/cmake.tar.gz - mkdir /tmp/cmake - tar -xzf /tmp/cmake.tar.gz -C /tmp/cmake From 11ea42677d05783983998eaa53944e94515ea3c1 Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Wed, 29 Nov 2017 14:44:23 -0500 Subject: [PATCH 20/26] fixup --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 10e4a6d..eddc76e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,8 +15,8 @@ install: before_script: - mkdir build - export BUILD_DIR=$PWD/build - - export CC=/usr/local/bin/gcc-5 - - export CXX=/usr/local/bin/g++-5 + - export CC=/usr/bin/gcc-5 + - export CXX=/usr/bin/g++-5 - wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz -O /tmp/cmake.tar.gz - mkdir /tmp/cmake - tar -xzf /tmp/cmake.tar.gz -C /tmp/cmake From 6e1222f07bf4d7cb6ca74dc586dac9e7424a8734 Mon Sep 17 00:00:00 2001 From: Abdelrahman Mahmoud Date: Fri, 23 Feb 2018 12:02:46 -0500 Subject: [PATCH 21/26] Fix travis to use the docker file --- .travis.yml | 43 ++++++------------------------------------- 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/.travis.yml b/.travis.yml index eddc76e..8a299ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,40 +1,9 @@ dist: trusty -sudo: require -language: cpp -compiler: gcc +sudo: required +language: ruby +services: + - docker before_install: - # C++11 - - sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test - - sudo apt-get update -qq - -install: - # C++11 - - sudo apt-get install -qq gcc-5 g++-5 libopencv-dev libcurl4-openssl-dev libssl-dev - -before_script: - - mkdir build - - export BUILD_DIR=$PWD/build - - export CC=/usr/bin/gcc-5 - - export CXX=/usr/bin/g++-5 - - wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz -O /tmp/cmake.tar.gz - - mkdir /tmp/cmake - - tar -xzf /tmp/cmake.tar.gz -C /tmp/cmake - - cd /tmp/cmake/cmake-3.8.1 - - ./bootstrap --system-curl - - make -j$(nproc) > /dev/null - - sudo make install > /dev/null - - wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz -O /tmp/boost.tar.gz - - mkdir /tmp/boost - - tar -xzf /tmp/boost.tar.gz -C /tmp/boost - - cd /tmp/boost/boost_1_63_0 - - ./bootstrap.sh - - sudo ./b2 -j $(nproc) cxxflags=-fPIC threading=multi runtime-link=shared --with-log --with-serialization --with-system --with-date_time --with-filesystem --with-regex --with-timer --with-chrono --with-thread --with-program_options install > /dev/null - - wget https://download.affectiva.com/linux/gcc-5.4/affdex-cpp-sdk-4.0-75-ubuntu-xenial-xerus-x86_64bit.tar.gz -O /tmp/affdex-sdk.tar.gz - - mkdir /tmp/affdex-sdk - - tar -xzf /tmp/affdex-sdk.tar.gz -C /tmp/affdex-sdk - - cd $BUILD_DIR - - cmake -DBOOST_ROOT=/usr/ -DOpenCV_DIR=/usr/ -DAFFDEX_DIR=/tmp/affdex-sdk .. - -script: - - make + - docker build --file=docker/Dockerfile-Ubuntu --tag=v4.0.0:affdex . + - docker run v4.0.0:affdex From c5398fd473b4b7f0eff43fbfe4609ea45c0a337c Mon Sep 17 00:00:00 2001 From: Abdelrahman Mahmoud Date: Fri, 23 Feb 2018 12:19:02 -0500 Subject: [PATCH 22/26] Work around the fact that the sourceforge https certificate is not valid --- docker/Dockerfile-CentOS | 2 +- docker/Dockerfile-Ubuntu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile-CentOS b/docker/Dockerfile-CentOS index 922c22e..b093c53 100644 --- a/docker/Dockerfile-CentOS +++ b/docker/Dockerfile-CentOS @@ -48,7 +48,7 @@ RUN cd $SRC_DIR/cmake-3.8.1/ && \ #### BOOST #### WORKDIR $SRC_DIR -RUN wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz && \ +RUN wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz --no-check-certificate && \ tar -xvf boost_1_63_0.tar.gz && \ rm boost_1_63_0.tar.gz && \ cd $SRC_DIR/boost_1_63_0 && \ diff --git a/docker/Dockerfile-Ubuntu b/docker/Dockerfile-Ubuntu index 2df9cfa..492eb5a 100644 --- a/docker/Dockerfile-Ubuntu +++ b/docker/Dockerfile-Ubuntu @@ -48,7 +48,7 @@ RUN cd $SRC_DIR/cmake-3.8.1/ && \ #### BOOST #### WORKDIR $SRC_DIR -RUN wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz && \ +RUN wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz --no-check-certificate && \ tar -xvf boost_1_63_0.tar.gz && \ rm boost_1_63_0.tar.gz && \ cd $SRC_DIR/boost_1_63_0 && \ From 15bb56663673543b2810a5942e90bda919af3ba5 Mon Sep 17 00:00:00 2001 From: Abdelrahman Mahmoud Date: Fri, 23 Feb 2018 12:44:10 -0500 Subject: [PATCH 23/26] Remove a bunch of things that I don't think we need --- .travis.yml | 7 ++----- docker/Dockerfile-CentOS | 4 ++-- docker/Dockerfile-Ubuntu | 9 ++++----- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8a299ce..1b48d6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,6 @@ -dist: trusty sudo: required -language: ruby services: - docker - +language: ruby before_install: - - docker build --file=docker/Dockerfile-Ubuntu --tag=v4.0.0:affdex . - - docker run v4.0.0:affdex + - docker build --file=docker/Dockerfile-Ubuntu --tag=v4.0.0:affdex diff --git a/docker/Dockerfile-CentOS b/docker/Dockerfile-CentOS index b093c53..01b7b74 100644 --- a/docker/Dockerfile-CentOS +++ b/docker/Dockerfile-CentOS @@ -39,7 +39,7 @@ RUN git clone https://github.com/Affectiva/cpp-sdk-samples.git $SRC_DIR/sdk-samp #### CMAKE #### WORKDIR $SRC_DIR RUN wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz \ - && tar -xvf cmake-3.8.1.tar.gz && rm cmake-3.8.1.tar.gz + && tar -xf cmake-3.8.1.tar.gz && rm cmake-3.8.1.tar.gz RUN cd $SRC_DIR/cmake-3.8.1/ && \ ./bootstrap --system-curl && \ make -j$(nproc) && \ @@ -49,7 +49,7 @@ RUN cd $SRC_DIR/cmake-3.8.1/ && \ #### BOOST #### WORKDIR $SRC_DIR RUN wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz --no-check-certificate && \ - tar -xvf boost_1_63_0.tar.gz && \ + tar -xf boost_1_63_0.tar.gz && \ rm boost_1_63_0.tar.gz && \ cd $SRC_DIR/boost_1_63_0 && \ ./bootstrap.sh &&\ diff --git a/docker/Dockerfile-Ubuntu b/docker/Dockerfile-Ubuntu index 492eb5a..dc0bdd8 100644 --- a/docker/Dockerfile-Ubuntu +++ b/docker/Dockerfile-Ubuntu @@ -39,17 +39,16 @@ RUN git clone https://github.com/Affectiva/cpp-sdk-samples.git $SRC_DIR/sdk-samp #### CMAKE #### WORKDIR $SRC_DIR RUN wget https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz \ - && tar -xvf cmake-3.8.1.tar.gz && rm cmake-3.8.1.tar.gz + && tar -xf cmake-3.8.1.tar.gz && rm cmake-3.8.1.tar.gz RUN cd $SRC_DIR/cmake-3.8.1/ && \ ./bootstrap --system-curl && \ - make -j$(nproc) && \ - make install && \ + make -j$(nproc) install > /dev/null && \ rm -rf $SRC_DIR/cmake-3.8.1 #### BOOST #### WORKDIR $SRC_DIR RUN wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz --no-check-certificate && \ - tar -xvf boost_1_63_0.tar.gz && \ + tar -xf boost_1_63_0.tar.gz && \ rm boost_1_63_0.tar.gz && \ cd $SRC_DIR/boost_1_63_0 && \ ./bootstrap.sh &&\ @@ -71,7 +70,7 @@ RUN wget https://download.affectiva.com/linux/gcc-5.4/affdex-cpp-sdk-4.0-75-ubun RUN mkdir -p $BUILD_DIR &&\ cd $BUILD_DIR &&\ cmake -DOpenCV_DIR=/usr/ -DBOOST_ROOT=/usr/ -DAFFDEX_DIR=$SRC_DIR/affdex-sdk $SRC_DIR/sdk-samples &&\ - make -j$(nproc) + make -j$(nproc) > /dev/null ## CREATE THE ARTIFACT WORKDIR $ARTIFACT_DIR From 727ef812d24f13c6fc67952d4be67bef26433228 Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Fri, 23 Feb 2018 17:19:58 -0500 Subject: [PATCH 24/26] Fixup on the build command --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1b48d6e..5471fb8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,4 +3,4 @@ services: - docker language: ruby before_install: - - docker build --file=docker/Dockerfile-Ubuntu --tag=v4.0.0:affdex + - docker build --file=docker/Dockerfile-Ubuntu --tag=v4.0.0:affdex . From 0c2861d63d065241324e29d6ff13717a464a0925 Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Sat, 24 Feb 2018 15:27:07 -0500 Subject: [PATCH 25/26] updating language to be generic and not ruby for docker --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5471fb8..fb753da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ sudo: required services: - docker -language: ruby +language: generic before_install: - docker build --file=docker/Dockerfile-Ubuntu --tag=v4.0.0:affdex . From b661460122de5cce5049dc24d972292a180e505d Mon Sep 17 00:00:00 2001 From: Umang Mehta Date: Sat, 24 Feb 2018 15:41:30 -0500 Subject: [PATCH 26/26] Updating the README instructions with LD_PRELOAD --- README.md | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index bb00d34..3f4a22e 100644 --- a/README.md +++ b/README.md @@ -73,17 +73,25 @@ $ ./bootstrap --system-curl && \ - Building the SDK on Ubuntu 16.04 ```bashrc -sudo apt-get install build-essential libopencv-dev libcurl4-openssl uuid-dev -wget https://download.affectiva.com/linux/gcc-5.4/affdex-cpp-sdk-4.0-75-ubuntu-xenial-xerus-x86_64bit.tar.gz -mkdir $HOME/affdex-sdk -tar -xzvf affdex-cpp-sdk-4.0-75-ubuntu-xenial-xerus-x86_64bit.tar.gz -C $HOME/affdex-sdk -export AFFDEX_DATA_DIR=$HOME/affdex-sdk/data -git clone https://github.com/Affectiva/cpp-sdk-samples.git $HOME/sdk-samples -mkdir $HOME/build -cd $HOME/build -cmake -DOpenCV_DIR=/usr/ -DBOOST_ROOT=/usr/ -DAFFDEX_DIR=$HOME/affdex-sdk $HOME/sdk-samples -make -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/affdex-sdk/lib +$ sudo apt-get install build-essential libopencv-dev libcurl4-openssl uuid-dev +$ wget https://download.affectiva.com/linux/gcc-5.4/affdex-cpp-sdk-4.0-75-ubuntu-xenial-xerus-x86_64bit.tar.gz +$ mkdir $HOME/affdex-sdk +$ tar -xzvf affdex-cpp-sdk-4.0-75-ubuntu-xenial-xerus-x86_64bit.tar.gz -C $HOME/affdex-sdk +$ export AFFDEX_DATA_DIR=$HOME/affdex-sdk/data +$ git clone https://github.com/Affectiva/cpp-sdk-samples.git $HOME/sdk-samples +$ mkdir $HOME/build +$ cd $HOME/build +$ cmake -DOpenCV_DIR=/usr/ -DBOOST_ROOT=/usr/ -DAFFDEX_DIR=$HOME/affdex-sdk $HOME/sdk-samples +$ make +$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/affdex-sdk/lib + +# The SDK statically links a forked version of OpenCV, so if you run into double free or corruption error +# then you will need to preload the OpenCV library installed from package manager +# Use this command to find the path of libopencv_core.so.2.4 + +$ ldconfig -p | grep libopencv_core.so.2.4 +$ export LD_PRELOAD=/path/to/libopencv_core.so.2.4 + ``` - Building the SDK on CentOS 7 @@ -100,6 +108,13 @@ $ cd $HOME/build $ cmake -DOpenCV_DIR=/usr/ -DBOOST_ROOT=/usr/ -DAFFDEX_DIR=$HOME/affdex-sdk $HOME/sdk-samples $ make $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/affdex-sdk/lib + +# The SDK statically links a forked version of OpenCV, so if you run into double free or corruption error +# then you will need to preload the OpenCV library installed from package manager +# Use this command to find the path of libopencv_core.so.2.4 + +$ ldconfig -p | grep libopencv_core.so.2.4 +$ export LD_PRELOAD=/path/to/libopencv_core.so.2.4 ``` OpenCV-webcam-demo (c++) @@ -145,4 +160,4 @@ For an example of how to use Affdex in a C# application .. please refer to [Affd Docker Build Instructions ------------------------- -The Dockerfile's are located in the docker directory. To build the docker image please refer to the files for instructions. +The Dockerfile's are located in the [docker](docker) directory. To build the docker image please refer to the files for instructions.