Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix-copyto-mismatched-dtype
- Loading branch information
Showing
561 changed files
with
20,950 additions
and
4,203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 "$@" |
Oops, something went wrong.