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 { pipeline {
agent any agent none
stages { stages {
stage("Build and test") { stage("Build and test") {
parallel { parallel {
stage("Build and test CUDA platform") { stage("Build and test CUDA platform") {
agent { label "cuda" } agent {
docker {
image "swails/openmm-all:latest"
label "cuda && docker"
alwaysPull true
}
}
steps { steps {
sh '''#!/bin/bash -lex sh "git clean -fxd && git checkout ."
git clean -fxd && git checkout . withEnv(["OPENMM_CUDA_COMPILER=/usr/local/cuda/bin/nvcc"]) {
env sh "devtools/ci/jenkins/install.sh"
module load cuda conda sh "devtools/ci/jenkins/test.sh -R 'TestCuda' --parallel 2"
export OPENMM_CUDA_COMPILER=`which nvcc` }
bash -e devtools/ci/jenkins/install.sh
bash -e devtools/ci/jenkins/test.sh -R 'TestCuda' --parallel 2
'''
} }
} }
stage("Build and test OpenCL platform") { stage("Build and test OpenCL platform") {
agent { label "cuda" } agent {
docker {
image "swails/openmm-all:latest"
label "cuda && docker"
alwaysPull true
}
}
steps { steps {
sh '''#!/bin/bash -lex sh "git clean -fxd && git checkout ."
git clean -fxd && git checkout . sh "devtools/ci/jenkins/install.sh"
env sh "devtools/ci/jenkins/test.sh -R 'TestOpenCL' --parallel 2"
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
'''
} }
} }
stage("Build/test CPU platforms") { stage("Build/test CPU platforms") {
agent { agent {
dockerfile { docker {
dir "devtools/ci/jenkins" image "swails/openmm-cpu:latest"
label "docker" label "docker"
alwaysPull true
} }
} }
steps { steps {
sh '''#!/bin/bash -lex sh "git clean -fxd && git checkout ."
git clean -fxd && git checkout . sh "devtools/ci/jenkins/install_and_test_cpu.sh"
bash -e 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: # This script is executed via the line:
# source devtools/ci/jenkins/install.sh # source devtools/ci/jenkins/install.sh
# in a bash shell with the -lex options turned on # in a bash shell with the -lex options turned on
...@@ -14,7 +15,7 @@ g++ --version ...@@ -14,7 +15,7 @@ g++ --version
if [ ! -z "$OPENMM_CUDA_COMPILER" ]; then if [ ! -z "$OPENMM_CUDA_COMPILER" ]; then
echo "Using nvcc ($OPENMM_CUDA_COMPILER) version:" echo "Using nvcc ($OPENMM_CUDA_COMPILER) version:"
$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 fi
cmake -DCMAKE_INSTALL_PREFIX="`pwd`/install" -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc \ 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" EXTRA_CMAKE_ARGS="-DOPENMM_BUILD_CUDA_LIB=false -DOPENMM_BUILD_OPENCL_LIB=false"
. devtools/ci/jenkins/install.sh . devtools/ci/jenkins/install.sh
......
#!/bin/sh #!/bin/bash -ex
python devtools/run-ctest.py --job-duration=120 --timeout 300 --in-order $* 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