Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

pfnCI on CuPy repository #865

Merged
merged 1 commit into from
May 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 51 additions & 30 deletions .pfnci/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,59 @@ TEMP=$(mktemp -d)
mount -t tmpfs tmpfs ${TEMP}/ -o size=100%

REPOSITORY=${REPOSITORY:-chainercv}
if [ ${REPOSITORY} = chainercv ]; then
cp -a . ${TEMP}/chainercv
elif [ ${REPOSITORY} = chainer ]; then
CHAINER=local
cp -a . ${TEMP}/chainer
mv ${TEMP}/chainer/chainercv/ ${TEMP}/
fi
case ${REPOSITORY} in
chainercv)
CUPY=${CHAINER}
cp -a . ${TEMP}/chainercv
;;
chainer)
CHAINER=local
CUPY=master
cp -a . ${TEMP}/chainer
mv ${TEMP}/chainer/chainercv/ ${TEMP}/
;;
cupy)
CHAINER=master
CUPY=local
cp -a . ${TEMP}/cupy
mv ${TEMP}/cupy/chainercv/ ${TEMP}/
;;
esac
cd ${TEMP}/

if [ ${CHAINER} = stable ]; then
echo pip${PYTHON} install \
chainer==${STABLE} \
cupy-cuda92==${STABLE} >> install.sh
elif [ ${CHAINER} = latest ]; then
echo pip${PYTHON} install \
chainer==${LATEST} \
cupy-cuda92==${LATEST} >> install.sh
elif [ ${CHAINER} = master ]; then
CHAINER_MASTER=$(git ls-remote https://github.com/chainer/chainer.git master | cut -f1)
echo pip${PYTHON} install \
git+https://github.com/chainer/chainer.git@${CHAINER_MASTER}#egg=chainer >> install.sh

CUPY_MASTER=$(gsutil -q cp gs://tmp-pfn-public-ci/cupy/wheel/master -)
gsutil -q cp gs://tmp-pfn-public-ci/cupy/wheel/${CUPY_MASTER}/cuda9.2/*.whl .
echo pip${PYTHON} install cupy-*-cp${PYTHON}*-cp${PYTHON}*-linux_x86_64.whl >> install.sh
elif [ ${CHAINER} = local ]; then
echo pip${PYTHON} install -e chainer/ >> install.sh

CUPY_MASTER=$(gsutil -q cp gs://tmp-pfn-public-ci/cupy/wheel/master -)
gsutil -q cp gs://tmp-pfn-public-ci/cupy/wheel/${CUPY_MASTER}/cuda9.2/*.whl .
echo pip${PYTHON} install cupy-*-cp${PYTHON}*-cp${PYTHON}*-linux_x86_64.whl >> install.sh
fi
case ${CHAINER} in
stable)
echo pip${PYTHON} install chainer==${STABLE} >> install.sh
;;
latest)
echo pip${PYTHON} install chainer==${LATEST} >> install.sh
;;
master)
CHAINER_MASTER=$(git ls-remote https://github.com/chainer/chainer.git master | cut -f1)
echo pip${PYTHON} install \
git+https://github.com/chainer/chainer.git@${CHAINER_MASTER}#egg=chainer >> install.sh
;;
local)
echo pip${PYTHON} install -e chainer/ >> install.sh
;;
esac

case ${CUPY} in
stable)
echo pip${PYTHON} install cupy-cuda92==${STABLE} >> install.sh
;;
latest)
echo pip${PYTHON} install cupy-cuda92==${LATEST} >> install.sh
;;
master)
CUPY_MASTER=$(gsutil -q cp gs://tmp-pfn-public-ci/cupy/wheel/master -)
gsutil -q cp gs://tmp-pfn-public-ci/cupy/wheel/${CUPY_MASTER}/cuda9.2/*.whl .
echo pip${PYTHON} install cupy-*-cp${PYTHON}*-cp${PYTHON}*-linux_x86_64.whl >> install.sh
;;
local)
echo pip${PYTHON} install -e cupy/ >> install.sh
;;
esac

echo pip${PYTHON} install -e chainercv/ >> install.sh

Expand Down