Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add ppc64le build support. (#472)
* Update version number for release v1.0.18 * Add ppc64le build support. * Skip this test on ppc64le.
- Loading branch information
1 parent
7cbd0d0
commit 2382330
Showing
12 changed files
with
285 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
# Copyright (c) 2017 Sony Corporation. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# for nnabla>=1.0.17 | ||
|
||
FROM ppc64le/centos:7 | ||
|
||
ENV LC_ALL C | ||
ENV LANG C | ||
ENV LANGUAGE C | ||
|
||
RUN yum install -y \ | ||
epel-release \ | ||
yum-utils \ | ||
&& yum install -y \ | ||
curl \ | ||
freetype-devel \ | ||
git \ | ||
hdf5 \ | ||
hdf5-devel \ | ||
lapack-devel \ | ||
libjpeg-devel \ | ||
liblzma-devel \ | ||
libpng-devel \ | ||
redhat-lsb-core \ | ||
rpm-build \ | ||
unzip \ | ||
wget \ | ||
zip \ | ||
zlib-static \ | ||
&& yum group install -y "Development Tools" \ | ||
&& yum clean all | ||
|
||
################################################### cmake | ||
ENV CMAKEVER=3.14.3 | ||
RUN mkdir /tmp/deps \ | ||
&& cd /tmp/deps \ | ||
&& yum install -y cmake3 \ | ||
&& curl -L https://github.com/Kitware/CMake/releases/download/v${CMAKEVER}/cmake-${CMAKEVER}.tar.gz -o cmake-${CMAKEVER}.tar.gz \ | ||
&& tar xf cmake-${CMAKEVER}.tar.gz \ | ||
&& cd cmake-${CMAKEVER} \ | ||
&& mkdir build \ | ||
&& cd build \ | ||
&& cmake3 -DBUILD_TESTING=FALSE .. \ | ||
&& make \ | ||
&& make install \ | ||
&& yum remove -y cmake3 \ | ||
&& yum clean all \ | ||
&& rm -rf /var/cache/yum/* \ | ||
&& cd / \ | ||
&& rm -rf /tmp/* | ||
|
||
################################################## protobuf | ||
ENV PROTOVER=3.4.1 | ||
RUN mkdir /tmp/deps \ | ||
&& cd /tmp/deps \ | ||
&& curl -L https://github.com/google/protobuf/archive/v${PROTOVER}.tar.gz -o protobuf-v${PROTOVER}.tar.gz \ | ||
&& tar xvf protobuf-v${PROTOVER}.tar.gz \ | ||
&& cd protobuf-${PROTOVER} \ | ||
&& mkdir build \ | ||
&& cd build \ | ||
&& cmake \ | ||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \ | ||
-Dprotobuf_BUILD_TESTS=OFF \ | ||
../cmake \ | ||
&& make \ | ||
&& make install \ | ||
&& cd / \ | ||
&& rm -rf /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 \ | ||
../libarchive-3.3.2 \ | ||
&& make \ | ||
&& make install \ | ||
&& cd / \ | ||
&& rm -rf /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 \ | ||
&& ./configure \ | ||
&& make \ | ||
&& make install \ | ||
&& cd / \ | ||
&& rm -rf /tmp/* | ||
|
||
################################################## miniconda3 | ||
ARG PYTHON_VERSION_MAJOR | ||
ARG PYTHON_VERSION_MINOR | ||
ENV PYVERNAME=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} | ||
|
||
ADD python/setup_requirements.txt /tmp/deps/ | ||
ADD python/requirements.txt /tmp/deps/ | ||
ADD python/test_requirements.txt /tmp/deps/ | ||
|
||
RUN umask 0 \ | ||
&& mkdir -p /tmp/deps \ | ||
&& cd /tmp/deps \ | ||
&& wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-ppc64le.sh \ | ||
&& bash Miniconda3-latest-Linux-ppc64le.sh -b -p /opt/miniconda3 \ | ||
&& rm -rf Miniconda3-latest-Linux-ppc64le.sh \ | ||
&& . /opt/miniconda3/bin/activate \ | ||
&& conda create -n nnabla-build python=${PYVERNAME} \ | ||
&& conda activate nnabla-build \ | ||
&& conda update --all -y \ | ||
&& pip install -U -r /tmp/deps/setup_requirements.txt \ | ||
&& pip install -U -r /tmp/deps/requirements.txt \ | ||
&& pip install -U -r /tmp/deps/test_requirements.txt \ | ||
&& conda clean -y --all \ | ||
&& cd / \ | ||
&& rm -rf /tmp/* | ||
|
||
ENV PATH /opt/miniconda3/envs/nnabla-build/bin:$PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.