Skip to content

Commit

Permalink
Merge pull request #98 from flatironinstitute/ci/jenkins-tweaks
Browse files Browse the repository at this point in the history
Jenkins tweaks
  • Loading branch information
WardBrian authored Oct 25, 2023
2 parents 2073268 + 2701ab1 commit 3ac1d5e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 78 deletions.
8 changes: 8 additions & 0 deletions ci/Dockerfile-cuda12.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM nvidia/cuda:12.0.0-devel-ubuntu22.04

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3 \
python3-pip \
python3-venv \
cmake && \
rm -rf /var/lib/apt/lists/*
32 changes: 17 additions & 15 deletions ci/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
pipeline {
agent none
options {
disableConcurrentBuilds()
disableConcurrentBuilds(abortPrevious: true)
buildDiscarder(logRotator(numToKeepStr: '8', daysToKeepStr: '20'))
timeout(time: 1, unit: 'HOURS')
}
stages {
stage('CUDA Tests') {
agent {
dockerfile {
filename 'ci/docker/Dockerfile-cuda11.8'
filename 'ci/Dockerfile-cuda12.0'
args '--gpus 2'
label 'docker && v100'
}
}
environment {
HOME = "$WORKSPACE"
PYBIN = "/opt/python/cp39-cp39/bin"
LIBRARY_PATH = "$WORKSPACE/finufft/build"
LD_LIBRARY_PATH = "$WORKSPACE/finufft/build"
}
Expand All @@ -36,31 +35,34 @@ pipeline {
echo $HOME
ls
'''
sh '''#!/bin/bash -ex
sh label: "build CUFINUFFT", script: '''#!/bin/bash -ex
cd finufft
# v100 cuda arch
cuda_arch="70"
cmake -B build . -DFINUFFT_USE_CUDA=ON \
-DFINUFFT_USE_CPU=OFF \
-DFINUFFT_BUILD_TESTS=OFF \
-DCMAKE_CUDA_ARCHITECTURES="$cuda_arch" \
-DBUILD_TESTING=ON
mkdir build
cd build
make -j4
cmake .. -DFINUFFT_USE_CUDA=ON \
-DFINUFFT_USE_CPU=OFF \
-DFINUFFT_BUILD_TESTS=OFF \
-DCMAKE_CUDA_ARCHITECTURES="$cuda_arch" \
-DBUILD_TESTING=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build . -j 4
'''

sh '${PYBIN}/python3 -m venv $HOME'
sh '''#!/bin/bash -ex
sh 'python3 -m venv $HOME'
sh label: "set up virtual environment", script: '''#!/bin/bash -ex
source $HOME/bin/activate
python3 -m pip install --upgrade pip
# we could also move pytorch install inside docker
python3 -m pip install "torch~=2.1.0" --index-url https://download.pytorch.org/whl/cu118
python3 -m pip install finufft/python/cufinufft
python3 -m pip install -e .[dev] # can make [dev,cuda] once cufinufft released?
python3 -m pytest -k "cuda" tests/ --cov -v --error-for-skips --durations=20
'''
sh label: "run tests", script: '''#!/bin/bash -ex
source $HOME/bin/activate
python3 -m pytest -k "cuda" tests/ --cov -v --error-for-skips
'''
}
}
Expand Down
57 changes: 0 additions & 57 deletions ci/docker/Dockerfile-cuda11.8

This file was deleted.

6 changes: 0 additions & 6 deletions ci/docker/cuda.repo

This file was deleted.

0 comments on commit 3ac1d5e

Please sign in to comment.