Skip to content

Commit

Permalink
Merge pull request #81 from sony/fix/20180802-eigen-download-source
Browse files Browse the repository at this point in the history
Fix/20180802 eigen download source
  • Loading branch information
YasunariZHashimoto authored Aug 2, 2018
2 parents ef3e144 + acd17f4 commit 1d9866c
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ if(BUILD_CPP_LIB)
list(APPEND NBLA_INCLUDE_DIRS
${PROJECT_SOURCE_DIR}/include
${NNABLA_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/third_party/eigen-eigen-de14376a69f8)
${CMAKE_CURRENT_SOURCE_DIR}/third_party/eigen-git-mirror-3.3.5)
include_directories(${NBLA_INCLUDE_DIRS};${PROJECT_BINARY_DIR})

###############################################################################
Expand Down
94 changes: 47 additions & 47 deletions docker/development/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
ARG BASE
FROM ${BASE}

ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL C
ENV LANG C
ENV LANGUAGE C

RUN yum install -y \
centos-release-scl \
Expand All @@ -43,10 +43,10 @@ ENV PATH=/opt/rh/git19/root/usr/bin:/opt/rh/devtoolset-4/root/usr/bin:$PATH
ENV LD_LIBRARY_PATH=/opt/rh/gti19/root/usr/lib64:/opt/rh/devtoolset-4/root/usr/lib64:/opt/rh/devtoolset-4/root/usr/lib:$LD_LIBRARY_PATH
ENV PKG_CONFIG_PATH=/opt/rh/git19/root/usr/lib64/pkgconfig:$PKG_CONFIG_PATH

RUN mkdir -p /tmp/deps \
&& yum install -y cmake \
&& yum clean all \
################################################## cmake
RUN mkdir /tmp/deps \
&& cd /tmp/deps \
&& yum install -y cmake \
&& curl -L https://cmake.org/files/v3.9/cmake-3.9.0.tar.gz -o cmake-3.9.0.tar.gz \
&& tar xf cmake-3.9.0.tar.gz \
&& cd cmake-3.9.0 \
Expand All @@ -55,11 +55,16 @@ RUN mkdir -p /tmp/deps \
&& cmake -DBUILD_TESTING=FALSE .. \
&& make \
&& make install \
&& yum remove -y cmake libarchive \
&& yum clean all \
&& rm -rf /var/cache/yum/* \
&& cd / \
&& rm -rf /tmp/*

RUN curl -L https://github.com/google/protobuf/archive/v3.1.0.tar.gz -o /tmp/protobuf-v3.1.0.tar.gz \
&& cd /tmp \
################################################## protobuf
RUN mkdir /tmp/deps \
&& cd /tmp/deps \
&& curl -L https://github.com/google/protobuf/archive/v3.1.0.tar.gz -o protobuf-v3.1.0.tar.gz \
&& tar xvf protobuf-v3.1.0.tar.gz \
&& cd protobuf-3.1.0 \
&& mkdir build \
Expand All @@ -73,40 +78,29 @@ RUN curl -L https://github.com/google/protobuf/archive/v3.1.0.tar.gz -o /tmp/pro
&& cd / \
&& rm -rf /tmp/*

RUN cd /tmp \
################################################## libarchive
RUN mkdir /tmp/deps \
&& cd /tmp/deps \
&& curl -L https://www.libarchive.org/downloads/libarchive-3.3.2.tar.gz -o libarchive-3.3.2.tar.gz \
&& tar xfa libarchive-3.3.2.tar.gz \
&& mkdir libarchive-build \
&& cd libarchive-build \
&& cmake \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DENABLE_NETTLE=FALSE \
-DENABLE_OPENSSL=FALSE \
-DENABLE_LZO=FALSE \
-DENABLE_LZMA=FALSE \
-DENABLE_BZip2=FALSE \
-DENABLE_LIBXML2=FALSE \
-DENABLE_EXPAT=FALSE \
-DENABLE_PCREPOSIX=FALSE \
-DENABLE_LibGCC=FALSE \
-DENABLE_CNG=FALSE \
-DENABLE_TAR=FALSE \
-DENABLE_TAR_SHARED=FALSE \
-DENABLE_CPIO=FALSE \
-DENABLE_CPIO_SHARED=FALSE \
-DENABLE_CAT=FALSE \
-DENABLE_CAT_SHARED=FALSE \
-DENABLE_XATTR=FALSE \
-DENABLE_ACL=FALSE \
-DENABLE_ICONV=FALSE \
-DENABLE_TEST=FALSE \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON -DENABLE_NETTLE=FALSE -DENABLE_OPENSSL=FALSE \
-DENABLE_LZO=FALSE -DENABLE_LZMA=FALSE -DENABLE_BZip2=FALSE \
-DENABLE_LIBXML2=FALSE -DENABLE_EXPAT=FALSE -DENABLE_PCREPOSIX=FALSE -DENABLE_LibGCC=FALSE \
-DENABLE_CNG=FALSE -DENABLE_TAR=FALSE -DENABLE_TAR_SHARED=FALSE -DENABLE_CPIO=FALSE \
-DENABLE_CPIO_SHARED=FALSE -DENABLE_CAT=FALSE -DENABLE_CAT_SHARED=FALSE -DENABLE_XATTR=FALSE \
-DENABLE_ACL=FALSE -DENABLE_ICONV=FALSE -DENABLE_TEST=FALSE \
../libarchive-3.3.2 \
&& make \
&& make install \
&& cd / \
&& rm -rf /tmp/*

RUN cd /tmp \
################################################## patchelf
RUN mkdir /tmp/deps \
&& cd /tmp/deps \
&& wget http://nixos.org/releases/patchelf/patchelf-0.9/patchelf-0.9.tar.bz2 \
&& tar xfa patchelf-0.9.tar.bz2 \
&& cd patchelf-0.9 \
Expand All @@ -116,26 +110,32 @@ RUN cd /tmp \
&& cd / \
&& rm -rf /tmp/*

################################################## miniconda3
ARG PYTHON_VERSION_MAJOR
ARG PYTHON_VERSION_MINOR
ENV PYENVNAME=py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}
ENV PYVERNAME=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}

# Conda environment for Python3 versions
ADD python/requirements.txt /tmp/deps/

RUN umask 0 \
&& wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/miniconda3 \
&& rm -rf Miniconda3-latest-Linux-x86_64.sh \
&& /opt/miniconda3/bin/conda create -y -n ${PYENVNAME} python=${PYVERNAME} \
&& source /opt/miniconda3/bin/activate ${PYENVNAME} \
&& conda install scandir scikit-image \
&& echo Try to install setuptools few times to avoid conda problem. \
&& (pip install --no-cache-dir -U setuptools || pip install --no-cache-dir -U setuptools || pip install --no-cache-dir -U setuptools || true) \
&& pip install --no-cache-dir -U -r /tmp/deps/requirements.txt \
&& pip install --no-cache-dir -U "pytest-pep8" \
&& pip install --no-cache-dir -U "pytest-cov" \
&& pip install --no-cache-dir -U "Cython<0.25" \
&& pip install --no-cache-dir -U "numpy<1.11"
&& mkdir -p /tmp/deps \
&& cd /tmp/deps \
&& wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/miniconda3 \
&& rm -rf Miniconda3-latest-Linux-x86_64.sh \
&& PATH=/opt/miniconda3/bin:$PATH \
&& conda install python=${PYVERNAME} \
&& conda update -y --all \
&& conda install scandir scikit-image \
&& echo Try to install setuptools few times to avoid conda problem. \
&& (pip install --no-cache-dir -U setuptools || pip install --no-cache-dir -U setuptools || pip install --no-cache-dir -U setuptools || true) \
&& pip install --no-cache-dir -U -r /tmp/deps/requirements.txt \
&& pip install --no-cache-dir -U "pytest-pep8" \
&& pip install --no-cache-dir -U "pytest-cov" \
&& pip install --no-cache-dir -U "Cython<0.25" \
&& pip install --no-cache-dir -U "numpy<1.11" \
&& conda clean -y --all \
&& cd / \
&& rm -rf /tmp/*

ENV PATH /opt/miniconda3/envs/${PYENVNAME}/bin:$PATH
ENV PATH /opt/miniconda3/bin:$PATH
2 changes: 1 addition & 1 deletion third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ if(BUILD_TEST)
add_subdirectory(googletest-release-1.7.0)
endif()

download_and_extract_third_party_library(eigen-eigen-de14376a69f8 https://bitbucket.org/eigen/eigen/get/de14376a69f8.zip)
download_and_extract_third_party_library(eigen-git-mirror-3.3.5 https://github.com/eigenteam/eigen-git-mirror/archive/3.3.5.zip)

0 comments on commit 1d9866c

Please sign in to comment.