Unverified Commit 5bc1013f authored by peastman's avatar peastman Committed by GitHub
Browse files

Merge pull request #2277 from swails/feature/cuda-docker

Enable docker for GPU builds
parents b71e92d9 808441b7
pipeline {
agent any
agent none
stages {
stage("Build and test") {
parallel {
stage("Build and test CUDA platform") {
agent { label "cuda" }
agent {
docker {
image "swails/openmm-all:latest"
label "cuda && docker"
alwaysPull true
}
}
steps {
sh '''#!/bin/bash -lex
git clean -fxd && git checkout .
env
module load cuda conda
export OPENMM_CUDA_COMPILER=`which nvcc`
bash -e devtools/ci/jenkins/install.sh
bash -e devtools/ci/jenkins/test.sh -R 'TestCuda' --parallel 2
'''
sh "git clean -fxd && git checkout ."
withEnv(["OPENMM_CUDA_COMPILER=/usr/local/cuda/bin/nvcc"]) {
sh "devtools/ci/jenkins/install.sh"
sh "devtools/ci/jenkins/test.sh -R 'TestCuda' --parallel 2"
}
}
}
stage("Build and test OpenCL platform") {
agent { label "cuda" }
agent {
docker {
image "swails/openmm-all:latest"
label "cuda && docker"
alwaysPull true
}
}
steps {
sh '''#!/bin/bash -lex
git clean -fxd && git checkout .
env
module load cuda conda
export OPENMM_CUDA_COMPILER=`which nvcc`
bash -e devtools/ci/jenkins/install.sh
bash -e devtools/ci/jenkins/test.sh -R 'TestOpenCL' --parallel 2
'''
sh "git clean -fxd && git checkout ."
sh "devtools/ci/jenkins/install.sh"
sh "devtools/ci/jenkins/test.sh -R 'TestOpenCL' --parallel 2"
}
}
stage("Build/test CPU platforms") {
agent {
dockerfile {
dir "devtools/ci/jenkins"
docker {
image "swails/openmm-cpu:latest"
label "docker"
alwaysPull true
}
}
steps {
sh '''#!/bin/bash -lex
git clean -fxd && git checkout .
bash -e devtools/ci/jenkins/install_and_test_cpu.sh
'''
sh "git clean -fxd && git checkout ."
sh "devtools/ci/jenkins/install_and_test_cpu.sh"
}
}
} // parallel
}
}
}
}
FROM ubuntu:xenial
ENV PATH="/opt/miniconda/bin:${PATH}"
RUN apt-get update && \
apt-get install -y wget git gromacs doxygen gfortran libfftw3-dev gcc g++ bzip2 automake make lsb-core && \
wget https://repo.continuum.io/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh -O miniconda.sh && \
bash miniconda.sh -b -p "/opt/miniconda" && \
rm -f miniconda.sh && \
mkdir /.conda && chmod -R 777 /.conda && chmod -R 777 /opt/miniconda && \
conda install -y cmake numpy scipy pytest swig cython
#!/bin/bash -ex
# This script is executed via the line:
# source devtools/ci/jenkins/install.sh
# in a bash shell with the -lex options turned on
......@@ -14,7 +15,7 @@ g++ --version
if [ ! -z "$OPENMM_CUDA_COMPILER" ]; then
echo "Using nvcc ($OPENMM_CUDA_COMPILER) version:"
$OPENMM_CUDA_COMPILER --version
CUDA_ARGS="-DCUDA_TOOLKIT_ROOT_DIR=${CUDA_HOME}"
CUDA_ARGS="-DCUDA_TOOLKIT_ROOT_DIR=${CUDA_HOME} -DOPENMM_BUILD_CUDA_LIB=true"
fi
cmake -DCMAKE_INSTALL_PREFIX="`pwd`/install" -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc \
......
#!/bin/bash
#!/bin/bash -ex
EXTRA_CMAKE_ARGS="-DOPENMM_BUILD_CUDA_LIB=false -DOPENMM_BUILD_OPENCL_LIB=false"
. devtools/ci/jenkins/install.sh
......
#!/bin/sh
#!/bin/bash -ex
python devtools/run-ctest.py --job-duration=120 --timeout 300 --in-order $*
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment