<commit_before>#! /usr/bin/env sh
set -eux

STABLE=5.3.0
LATEST=6.0.0b3

systemctl stop docker.service
mount -t tmpfs tmpfs /var/lib/docker/ -o size=100%
gsutil -q cp gs://tmp-pfn-public-ci/chainercv/docker.tar - | tar -xf - -C /var/lib/docker/ || true
systemctl start docker.service

TEMP=$(mktemp -d)
mount -t tmpfs tmpfs ${TEMP}/ -o size=100%

if [ ${OPTIONAL_MODULES} -gt 0 ]; then
    DOCKER_IMAGE=devel
else
    DOCKER_IMAGE=devel-minimal
fi
docker build -t ${DOCKER_IMAGE} .pfnci/docker/${DOCKER_IMAGE}/

if [ ${CHAINER} = stable ]; then
    cat - << EOD > install.sh
pip${PYTHON} install \
             chainer==${STABLE} \
             cupy-cuda92==${STABLE}
EOD
elif [ ${CHAINER} = latest ]; then
    cat - << EOD > install.sh
pip${PYTHON} install \
             chainer==${LATEST} \
             cupy-cuda92==${LATEST}
EOD
elif [ ${CHAINER} = master ]; then
    CHAINER_MASTER=$(git ls-remote https://github.com/chainer/chainer.git master | cut -f1)
    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 .
    cat - << EOD > install.sh
pip${PYTHON} install \
             git+https://github.com/chainer/chainer.git@${CHAINER_MASTER}#egg=chainer \
             cupy-*-cp${PYTHON}*-cp${PYTHON}*-linux_x86_64.whl
EOD
fi

cat - << EOD >> install.sh
pip${PYTHON} install -e .
EOD
<commit_msg>update stable/latest<commit_after>#! /usr/bin/env sh
set -eux

STABLE=5.4.0
LATEST=6.0.0rc1

systemctl stop docker.service
mount -t tmpfs tmpfs /var/lib/docker/ -o size=100%
gsutil -q cp gs://tmp-pfn-public-ci/chainercv/docker.tar - | tar -xf - -C /var/lib/docker/ || true
systemctl start docker.service

TEMP=$(mktemp -d)
mount -t tmpfs tmpfs ${TEMP}/ -o size=100%

if [ ${OPTIONAL_MODULES} -gt 0 ]; then
    DOCKER_IMAGE=devel
else
    DOCKER_IMAGE=devel-minimal
fi
docker build -t ${DOCKER_IMAGE} .pfnci/docker/${DOCKER_IMAGE}/

if [ ${CHAINER} = stable ]; then
    cat - << EOD > install.sh
pip${PYTHON} install \
             chainer==${STABLE} \
             cupy-cuda92==${STABLE}
EOD
elif [ ${CHAINER} = latest ]; then
    cat - << EOD > install.sh
pip${PYTHON} install \
             chainer==${LATEST} \
             cupy-cuda92==${LATEST}
EOD
elif [ ${CHAINER} = master ]; then
    CHAINER_MASTER=$(git ls-remote https://github.com/chainer/chainer.git master | cut -f1)
    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 .
    cat - << EOD > install.sh
pip${PYTHON} install \
             git+https://github.com/chainer/chainer.git@${CHAINER_MASTER}#egg=chainer \
             cupy-*-cp${PYTHON}*-cp${PYTHON}*-linux_x86_64.whl
EOD
fi

cat - << EOD >> install.sh
pip${PYTHON} install -e .
EOD

{'fraction_non_alphanumeric': 0.1712962962962963, 'fraction_numerical': 0.017806267806267807, 'mean_word_length': 2.7908232118758436, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 13, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1405955', 'n_tokens_mistral': 1180, 'n_tokens_neox': 1143, 'n_words': 221}