Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test on ppc64le #485

Merged
merged 2 commits into from Jul 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions docker/development/Dockerfile.build
Expand Up @@ -145,6 +145,7 @@ ARG PYTHON_VERSION_MAJOR
ARG PYTHON_VERSION_MINOR
ENV PYVERNAME=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}

# Limitation: numpy>=1.17 does not support python2.7
ADD python/setup_requirements.txt /tmp/deps/
ADD python/requirements.txt /tmp/deps/
ADD python/test_requirements.txt /tmp/deps/
Expand All @@ -158,6 +159,7 @@ RUN umask 0 \
&& . /opt/miniconda3/bin/activate \
&& conda create -n nnabla-build python=${PYVERNAME} \
&& conda activate nnabla-build \
&& pip install numpy\<1.17 \
&& pip install --only-binary -U -r /tmp/deps/setup_requirements.txt \
&& pip install --only-binary -U -r /tmp/deps/requirements.txt \
&& pip install --only-binary -U -r /tmp/deps/test_requirements.txt \
Expand Down
5 changes: 3 additions & 2 deletions docker/development/Dockerfile.build-armhf
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# for nnabla>=1.0.17

FROM multiarch/ubuntu-core:armhf-xenial

ENV LC_ALL C
Expand Down Expand Up @@ -65,6 +63,7 @@ RUN mkdir /tmp/deps \
&& cd / \
&& rm -rf /tmp/*

# Limitation: numpy>=1.17 does not support python2.7
ADD python/setup_requirements.txt /tmp/deps/
ADD python/requirements.txt /tmp/deps/
ADD python/test_requirements.txt /tmp/deps/
Expand All @@ -74,12 +73,14 @@ RUN python2 -m pip install --upgrade pip

RUN pip install ipython==5.0

RUN pip install numpy\<1.17
RUN pip install -r /tmp/deps/setup_requirements.txt
RUN pip install -r /tmp/deps/requirements.txt
RUN pip install -r /tmp/deps/test_requirements.txt

RUN pip3 install ipython

RUN pip3 install numpy\<1.17
RUN pip3 install -r /tmp/deps/setup_requirements.txt
RUN pip3 install -r /tmp/deps/requirements.txt
RUN pip3 install -r /tmp/deps/test_requirements.txt
4 changes: 2 additions & 2 deletions docker/development/Dockerfile.build-ppc64le
Expand Up @@ -12,8 +12,6 @@
# 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
Expand Down Expand Up @@ -116,6 +114,7 @@ ARG PYTHON_VERSION_MAJOR
ARG PYTHON_VERSION_MINOR
ENV PYVERNAME=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}

# Limitation: numpy>=1.17 does not support python2.7
ADD python/setup_requirements.txt /tmp/deps/
ADD python/requirements.txt /tmp/deps/
ADD python/test_requirements.txt /tmp/deps/
Expand All @@ -130,6 +129,7 @@ RUN umask 0 \
&& conda create -n nnabla-build python=${PYVERNAME} \
&& conda activate nnabla-build \
&& conda update --all -y \
&& pip install numpy\<1.17 \
&& 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 \
Expand Down
2 changes: 2 additions & 0 deletions docker/development/Dockerfile.onnx-test
Expand Up @@ -102,6 +102,7 @@ ARG PYTHON_VERSION_MAJOR
ARG PYTHON_VERSION_MINOR
ENV PYVERNAME=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}

# Limitation: numpy>=1.17 does not support python2.7
ADD python/setup_requirements.txt /tmp/deps/
ADD python/requirements.txt /tmp/deps/
ADD python/test_requirements.txt /tmp/deps/
Expand All @@ -115,6 +116,7 @@ RUN umask 0 \
&& . /opt/miniconda3/bin/activate \
&& conda create -n nnabla-build python=${PYVERNAME} \
&& conda activate nnabla-build \
&& pip install numpy\<1.17 \
&& pip install --only-binary -U -r /tmp/deps/setup_requirements.txt \
&& pip install --only-binary -U -r /tmp/deps/requirements.txt \
&& pip install --only-binary -U -r /tmp/deps/test_requirements.txt \
Expand Down
13 changes: 6 additions & 7 deletions docker/development/Dockerfile.onnx-test-armhf
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# for nnabla>=1.0.17

FROM multiarch/ubuntu-core:armhf-xenial

ENV LC_ALL C
Expand Down Expand Up @@ -65,17 +63,18 @@ RUN mkdir /tmp/deps \
&& cd / \
&& rm -rf /tmp/*

# Limitation: numpy>=1.17 does not support python2.7
RUN python3 -m pip install --upgrade pip
RUN python2 -m pip install --upgrade pip

RUN pip install --no-cache-dir numpy\<1.17
RUN pip install --no-cache-dir \
autopep8 \
boto3 \
cython \
h5py \
mako \
numpy\>=1.16 \
onnx==1.4.1 \
onnx \
pillow \
protobuf \
pytest \
Expand All @@ -84,15 +83,16 @@ RUN pip install --no-cache-dir \
scipy \
tqdm \
virtualenv
RUN pip install ipython==5.0

RUN pip3 install --no-cache-dir numpy\<1.17
RUN pip3 install --no-cache-dir \
autopep8 \
boto3 \
cython \
h5py \
mako \
numpy\>=1.16 \
onnx==1.4.1 \
onnx \
pillow \
protobuf \
pytest \
Expand All @@ -102,5 +102,4 @@ RUN pip3 install --no-cache-dir \
tqdm \
virtualenv

RUN pip install ipython==5.0
RUN pip3 install ipython
2 changes: 2 additions & 0 deletions docker/development/Dockerfile.onnx-test-ppc64le
Expand Up @@ -105,6 +105,7 @@ ARG PYTHON_VERSION_MAJOR
ARG PYTHON_VERSION_MINOR
ENV PYVERNAME=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}

# Limitation: numpy>=1.17 does not support python2.7
ADD python/setup_requirements.txt /tmp/deps/
ADD python/requirements.txt /tmp/deps/
ADD python/test_requirements.txt /tmp/deps/
Expand All @@ -119,6 +120,7 @@ RUN umask 0 \
&& conda create -n nnabla-build python=${PYVERNAME} \
&& conda activate nnabla-build \
&& conda update --all -y \
&& pip install numpy\<1.17 \
&& 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 \
Expand Down
4 changes: 2 additions & 2 deletions python/requirements.txt
@@ -1,9 +1,9 @@
numpy>=1.16,<1.17
Cython
boto3
requests
h5py
numpy>=1.16
onnx==1.4.1
onnx
protobuf
pyyaml
requests
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Expand Up @@ -24,7 +24,7 @@

setup_requires = [
'setuptools',
'numpy>=1.16',
'numpy>=1.16,<1.17',
'Cython', # Requires python-dev.
]

Expand Down
3 changes: 3 additions & 0 deletions python/test/test_graph.py
Expand Up @@ -180,6 +180,9 @@ def test_graph_clear_buffer(seed):
g = list(nn.get_parameters().values())[0].g.copy()
else:
g2 = list(nn.get_parameters().values())[0].g.copy()
import platform
if platform.machine() == 'ppc64le':
pytest.skip("This test fails on ppc64le")
assert np.all(g == g2)


Expand Down