From 0cc0ece257cfa672e6dbcaf2afcb0eb08e3a447c Mon Sep 17 00:00:00 2001 From: niboshi Date: Wed, 8 May 2019 20:06:10 +0900 Subject: [PATCH] Use pip for installing Chainer/CuPy --- test.sh | 8 ++------ test_cpu.sh | 3 ++- test_cupy.sh | 3 ++- test_cupy_doc.sh | 6 +++--- test_cupy_slow.sh | 3 ++- test_doc.sh | 4 +--- test_example.sh | 4 +--- test_prev_example.sh | 4 +--- test_slow.sh | 8 ++------ 9 files changed, 16 insertions(+), 27 deletions(-) diff --git a/test.sh b/test.sh index 456287ae..0931a336 100755 --- a/test.sh +++ b/test.sh @@ -2,13 +2,9 @@ # Chainer setup script installs specific version of CuPy. # We need to install Chainer first for test. -cd chainer -python setup.py install --user -cd .. +pip install --user chainer/ -cd cupy -python setup.py build -j 4 develop install --user || python setup.py develop install --user -cd .. +pip install --user -e cupy/ cd chainer diff --git a/test_cpu.sh b/test_cpu.sh index 1a144333..291ce507 100755 --- a/test_cpu.sh +++ b/test_cpu.sh @@ -1,8 +1,9 @@ #!/bin/bash -e +pip install --user -e chainer/ + cd chainer -python setup.py develop install --user export CUPY_DUMP_CUDA_SOURCE_ON_ERROR=1 diff --git a/test_cupy.sh b/test_cupy.sh index a8f155ef..96f3eb40 100755 --- a/test_cupy.sh +++ b/test_cupy.sh @@ -1,7 +1,8 @@ #!/bin/bash -ex +pip install --user -e cupy/ + cd cupy -python setup.py build -j 4 develop install --user || python setup.py develop install --user export CUPY_DUMP_CUDA_SOURCE_ON_ERROR=1 diff --git a/test_cupy_doc.sh b/test_cupy_doc.sh index 180f039c..74a033d1 100755 --- a/test_cupy_doc.sh +++ b/test_cupy_doc.sh @@ -1,9 +1,9 @@ #!/bin/sh -ex -cd cupy -python setup.py -q build -j 4 develop install --user || python setup.py -q develop install --user +pip install --user -e cupy/ + +cd cupy/docs -cd docs export SPHINXOPTS=-W # Generate HTML and preserve it for preview. diff --git a/test_cupy_slow.sh b/test_cupy_slow.sh index 7a225d87..1bb330c4 100755 --- a/test_cupy_slow.sh +++ b/test_cupy_slow.sh @@ -1,7 +1,8 @@ #!/bin/bash -ex +pip install --user -e cupy/ + cd cupy -python setup.py build -j 4 develop install --user || python setup.py develop install --user export CUPY_DUMP_CUDA_SOURCE_ON_ERROR=1 diff --git a/test_doc.sh b/test_doc.sh index 678c5faf..e7a8c2e8 100755 --- a/test_doc.sh +++ b/test_doc.sh @@ -1,8 +1,6 @@ #!/bin/sh -ex -cd cupy -python setup.py -q build -j 4 develop install --user || python setup.py -q develop install --user -cd .. +pip install --user -e cupy/ cd chainer pip install --user -e .[docs] diff --git a/test_example.sh b/test_example.sh index 29195017..f86aeac0 100755 --- a/test_example.sh +++ b/test_example.sh @@ -2,9 +2,7 @@ pip install -U pip --user -cd cupy -python setup.py build -j 4 develop install --user || python setup.py develop install --user -cd .. +pip install --user -e cupy/ cd chainer rm -rf dist diff --git a/test_prev_example.sh b/test_prev_example.sh index 7eb2a657..daa207d0 100755 --- a/test_prev_example.sh +++ b/test_prev_example.sh @@ -5,9 +5,7 @@ CHAINER_DIR=chainer-${PREV_VER} pip install -U pip --user -cd cupy -python setup.py build -j 4 develop install --user || python setup.py develop install --user -cd .. +pip install --user -e cupy/ cd chainer rm -rf dist diff --git a/test_slow.sh b/test_slow.sh index 61ebe6a1..03f49656 100755 --- a/test_slow.sh +++ b/test_slow.sh @@ -2,13 +2,9 @@ # Chainer setup script installs specific version of CuPy. # We need to install Chainer first for test. -cd chainer -python setup.py install --user -cd .. +pip install --user chainer/ -cd cupy -python setup.py build -j 4 develop install --user || python setup.py develop install --user -cd .. +pip install --user -e cupy/ cd chainer