Skip to content

Commit

Permalink
Merge branch 'master' into fix-copyto-mismatched-dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
toslunar committed Feb 25, 2020
2 parents 0aa2ad7 + 37cfc76 commit 5bbb615
Show file tree
Hide file tree
Showing 561 changed files with 20,950 additions and 4,203 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Expand Up @@ -23,4 +23,4 @@ python -c 'import chainer; chainer.print_runtime_info()'

Thank you for your cooperation!

Support is available on our [Slack Chat](https://bit.ly/join-chainer-slack).
Support is available on our [Slack Chat](https://bit.ly/go-chainer-slack).
9 changes: 9 additions & 0 deletions .mergify.yml
Expand Up @@ -15,6 +15,15 @@ pull_request_rules:
- status-success=pfn-public-ci/chainer.py3.cv
- status-success=pfn-public-ci/chainer.py3.cv.examples
- status-success=pfn-public-ci/chainer.py3.cv.gpu
- status-success=pfn-public-ci/chainermn.cpu
- status-success=pfn-public-ci/chainermn.gpu
- status-success=pfn-public-ci/onnxchainer.py35.cpu
- status-success=pfn-public-ci/onnxchainer.py36.cpu
- status-success=pfn-public-ci/onnxchainer.py36.cpu.onnx14
- status-success=pfn-public-ci/onnxchainer.py37.cpu
- status-success=pfn-public-ci/onnxchainer.py37.cpu.onnx15
- status-success=pfn-public-ci/onnxchainer.py37.gpu
- status-success=pfn-public-ci/onnxchainer.win.py37.gpu
actions:
merge:
method: merge
Expand Down
4 changes: 4 additions & 0 deletions .pfnci/.gitignore
@@ -0,0 +1,4 @@
# cupy directory may be made by script.sh in docker.* targets.
# docker.* targets of script.sh create /cupy directory to pull the latest CuPy
# repository to create the base image of Chainer CI.
/cupy
63 changes: 63 additions & 0 deletions .pfnci/chainermn-ci-prep.Dockerfile
@@ -0,0 +1,63 @@
ARG BASE_IMAGE

FROM nvidia/cuda:${BASE_IMAGE}

RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
git \
cmake \
libblas3 \
libblas-dev \
curl \
zlib1g-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libffi-dev \
build-essential \
libbz2-dev \
ssh \
wget \
&& \
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*

# Install OpenMPI with CUDA
ENV OMPI_VERSION 3.1.3

RUN cd /tmp && wget -q https://www.open-mpi.org/software/ompi/v${OMPI_VERSION%\.*}/downloads/openmpi-$OMPI_VERSION.tar.bz2 && \
tar -xjf openmpi-$OMPI_VERSION.tar.bz2

RUN cd /tmp/openmpi-$OMPI_VERSION && \
./configure --prefix=/usr --with-cuda --disable-oshmem --disable-mpi-java --disable-java --disable-mpi-fortran && \
make -j 10 && make install && cd && rm -r /tmp/openmpi-$OMPI_VERSION* && \
/usr/bin/ompi_info --parsable --all | grep -q "mpi_built_with_cuda_support:value:true" && \
rm -rf /tmp/openmpi-*


# Install pyenv

ENV PYENV_ROOT /usr/local/pyenv
ENV BASH_PROFILE /root/.bash_profile

RUN git clone https://github.com/pyenv/pyenv.git $PYENV_ROOT

RUN touch $BASH_PROFILE && \
echo 'export PYENV_ROOT="$PYENV_ROOT"' >> $BASH_PROFILE && \
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> $BASH_PROFILE && \
echo 'eval "$(pyenv init -)"' >> $BASH_PROFILE

#
# Install Python and necessary packages
#


# Python 3.6.8

ENV PYTHON_VERSION 3.6.8

RUN . $BASH_PROFILE && pyenv install $PYTHON_VERSION && \
pyenv shell ${PYTHON_VERSION} && \
pip install -U pip && \
pip install cython && \
pip install chainer pytest mock mpi4py && \
pip uninstall -y chainer
45 changes: 45 additions & 0 deletions .pfnci/chainermn-ci-prep.sh
@@ -0,0 +1,45 @@
#!/bin/bash
# Usage: .pfnci/chainermn-ci-prep.sh [target]
# - target is a test target (e.g., "chainermn-ci-prep-cuda92").
#
# For testing this script, set DRYRUN=1 as an environment variable and run the
# script. It will print commands without execution.
# $ DRYRUN=1 bash .pfnci/script.sh chainermn-ci-prep-cuda92

set -eu

cd "$(dirname "${BASH_SOURCE}")"/..

main() {
TARGET="$1"
BASE_IMAGE="$2"

prepare_docker &
wait

run docker build -t "asia.gcr.io/pfn-public-ci/${TARGET}" \
--build-arg "BASE_IMAGE=${BASE_IMAGE}" \
-f ".pfnci/chainermn-ci-prep.Dockerfile" .
run docker push "asia.gcr.io/pfn-public-ci/${TARGET}"
}

# run executes a command. If DRYRUN is enabled, run just prints the command.
run() {
echo '+' "$@"
if [ "${DRYRUN:-}" == '' ]; then
"$@"
fi
}

# prepare_docker makes docker use tmpfs to speed up.
# CAVEAT: Do not use docker during this is running.
prepare_docker() {
if [ "${CI:-}" != '' ]; then
run service docker stop
run mount -t tmpfs -o size=100% tmpfs /var/lib/docker
run service docker start
fi
run gcloud auth configure-docker
}

main "$@"

0 comments on commit 5bbb615

Please sign in to comment.