Unverified Commit b0eb7713 authored by Peter Eastman's avatar Peter Eastman Committed by GitHub
Browse files

Revised code from installing CUDA on CI (#4470)

* Revised code from installing CUDA on CI

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging
parent af229eb4
...@@ -28,10 +28,10 @@ jobs: ...@@ -28,10 +28,10 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- name: Linux CUDA 10.0 - name: Linux CUDA 12.4
os: ubuntu-latest os: ubuntu-latest
python-version: "3.7" python-version: "3.11"
cuda-version: "10.0" cuda-version: "12.4"
OPENCL: false OPENCL: false
CMAKE_FLAGS: | CMAKE_FLAGS: |
-DOPENMM_BUILD_CUDA_TESTS=OFF \ -DOPENMM_BUILD_CUDA_TESTS=OFF \
...@@ -42,18 +42,17 @@ jobs: ...@@ -42,18 +42,17 @@ jobs:
-DOPENMM_BUILD_SERIALIZATION_TESTS=OFF \ -DOPENMM_BUILD_SERIALIZATION_TESTS=OFF \
-DOPENMM_BUILD_C_AND_FORTRAN_WRAPPERS=OFF \ -DOPENMM_BUILD_C_AND_FORTRAN_WRAPPERS=OFF \
-DOPENMM_BUILD_EXAMPLES=OFF \ -DOPENMM_BUILD_EXAMPLES=OFF \
-DOPENCL_LIBRARY=/usr/local/cuda-10.0/lib64/libOpenCL.so \ -DCUDA_CUDART_LIBRARY=/usr/local/cuda-12.4/lib64/libcudart.so \
-DCUDA_CUDART_LIBRARY=/usr/local/cuda-10.0/lib64/libcudart.so \ -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-12.4/bin/nvcc \
-DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-10.0/bin/nvcc \ -DCUDA_SDK_ROOT_DIR=/usr/local/cuda-12.4/ \
-DCUDA_SDK_ROOT_DIR=/usr/local/cuda-10.0/ \ -DCUDA_TOOLKIT_INCLUDE=/usr/local/cuda-12.4/include \
-DCUDA_TOOLKIT_INCLUDE=/usr/local/cuda-10.0/include \ -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.4/ \
-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.0/ \
- name: Linux CUDA 11.8
- name: Linux CUDA 11.2
os: ubuntu-latest os: ubuntu-latest
python-version: "3.7" python-version: "3.11"
OPENCL: false OPENCL: false
cuda-version: "11.2" cuda-version: "11.8"
CMAKE_FLAGS: | CMAKE_FLAGS: |
-DOPENMM_BUILD_CUDA_TESTS=OFF \ -DOPENMM_BUILD_CUDA_TESTS=OFF \
-DOPENMM_BUILD_OPENCL_TESTS=OFF \ -DOPENMM_BUILD_OPENCL_TESTS=OFF \
...@@ -63,7 +62,6 @@ jobs: ...@@ -63,7 +62,6 @@ jobs:
-DOPENMM_BUILD_SERIALIZATION_TESTS=OFF \ -DOPENMM_BUILD_SERIALIZATION_TESTS=OFF \
-DOPENMM_BUILD_C_AND_FORTRAN_WRAPPERS=OFF \ -DOPENMM_BUILD_C_AND_FORTRAN_WRAPPERS=OFF \
-DOPENMM_BUILD_EXAMPLES=OFF \ -DOPENMM_BUILD_EXAMPLES=OFF \
-DOPENCL_LIBRARY=/usr/local/cuda-11.2/lib64/libOpenCL.so \
-DCUDA_CUDART_LIBRARY=/usr/local/cuda-11.2/lib64/libcudart.so \ -DCUDA_CUDART_LIBRARY=/usr/local/cuda-11.2/lib64/libcudart.so \
-DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-11.2/bin/nvcc \ -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-11.2/bin/nvcc \
-DCUDA_SDK_ROOT_DIR=/usr/local/cuda-11.2/ \ -DCUDA_SDK_ROOT_DIR=/usr/local/cuda-11.2/ \
...@@ -72,7 +70,7 @@ jobs: ...@@ -72,7 +70,7 @@ jobs:
- name: Linux AMD OpenCL - name: Linux AMD OpenCL
os: ubuntu-latest os: ubuntu-latest
python-version: "3.7" python-version: "3.11"
OPENCL: true OPENCL: true
cuda-version: "" cuda-version: ""
CMAKE_FLAGS: | CMAKE_FLAGS: |
...@@ -90,9 +88,9 @@ jobs: ...@@ -90,9 +88,9 @@ jobs:
-DOPENCL_INCLUDE_DIR=${GITHUB_WORKSPACE}/AMDAPPSDK/include \ -DOPENCL_INCLUDE_DIR=${GITHUB_WORKSPACE}/AMDAPPSDK/include \
-DOPENCL_LIBRARY=${GITHUB_WORKSPACE}/AMDAPPSDK/lib/x86_64/libOpenCL.so \ -DOPENCL_LIBRARY=${GITHUB_WORKSPACE}/AMDAPPSDK/lib/x86_64/libOpenCL.so \
- name: Linux CPU Python 3.7 with static lib - name: Linux CPU Python 3.11 with static lib
os: ubuntu-latest os: ubuntu-latest
python-version: "3.7" python-version: "3.11"
OPENCL: false OPENCL: false
cuda-version: "" cuda-version: ""
CC: $CCACHE/clang CC: $CCACHE/clang
...@@ -102,8 +100,8 @@ jobs: ...@@ -102,8 +100,8 @@ jobs:
-DOPENMM_BUILD_OPENCL_LIB=OFF \ -DOPENMM_BUILD_OPENCL_LIB=OFF \
-DOPENMM_BUILD_OPENCL_TESTS=OFF \ -DOPENMM_BUILD_OPENCL_TESTS=OFF \
- name: Linux CPU Python 3.7 with condaforge compilers - name: Linux CPU Python 3.11 with condaforge compilers
python-version: "3.7" python-version: "3.11"
os: ubuntu-latest os: ubuntu-latest
OPENCL: false OPENCL: false
cuda-version: "" cuda-version: ""
...@@ -112,8 +110,8 @@ jobs: ...@@ -112,8 +110,8 @@ jobs:
-DOPENMM_BUILD_OPENCL_LIB=OFF \ -DOPENMM_BUILD_OPENCL_LIB=OFF \
-DOPENMM_BUILD_OPENCL_TESTS=OFF \ -DOPENMM_BUILD_OPENCL_TESTS=OFF \
- name: Linux CPU Python 3.7 - name: Linux CPU Python 3.9
python-version: "3.7" python-version: "3.9"
os: ubuntu-latest os: ubuntu-latest
OPENCL: false OPENCL: false
cuda-version: "" cuda-version: ""
......
# This script install CUDA on Ubuntu-based systemws # This script install CUDA on Ubuntu-based systems
# It uses the Nvidia repos for Ubuntu 18.04, which as of Dec 2020 # It uses the Nvidia repos for Ubuntu 22.04
# includes packages for CUDA 10.0, 10.1, 10.2, 11.0, 11.1, 11.2 # Future versions might require an updated repo
# Future versions might require an updated repo (maybe Ubuntu 20)
# It expects a $CUDA_VERSION environment variable set to major.minor (e.g. 10.0) # It expects a $CUDA_VERSION environment variable set to major.minor (e.g. 10.0)
set -euxo pipefail set -euxo pipefail
...@@ -9,23 +8,18 @@ set -euxo pipefail ...@@ -9,23 +8,18 @@ set -euxo pipefail
# Enable retrying # Enable retrying
echo 'APT::Acquire::Retries "5";' | sudo tee /etc/apt/apt.conf.d/80-retries echo 'APT::Acquire::Retries "5";' | sudo tee /etc/apt/apt.conf.d/80-retries
sudo wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 --tries 5 \ sudo apt-key del 7fa2af80
-O /etc/apt/preferences.d/cuda-repository-pin-600 \ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub sudo apt-get update
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
sudo apt-get update -qq
CUDA_APT=${CUDA_VERSION/./-} CUDA_APT=${CUDA_VERSION/./-}
## cufft changed package names in CUDA 11
if [[ ${CUDA_VERSION} == 10.* ]]; then CUFFT="cuda-cufft"; else CUFFT="libcufft"; fi
sudo apt-get install -y \ sudo apt-get install -y \
libgl1-mesa-dev cuda-compiler-${CUDA_APT} \ libgl1-mesa-dev cuda-compiler-${CUDA_APT} \
cuda-drivers cuda-driver-dev-${CUDA_APT} \ cuda-drivers cuda-driver-dev-${CUDA_APT} \
cuda-cudart-${CUDA_APT} cuda-cudart-dev-${CUDA_APT} \ cuda-cudart-${CUDA_APT} cuda-cudart-dev-${CUDA_APT} \
${CUFFT}-${CUDA_APT} ${CUFFT}-dev-${CUDA_APT} \ libcufft-${CUDA_APT} libcufft-dev-${CUDA_APT} \
cuda-nvrtc-${CUDA_APT} cuda-nvrtc-dev-${CUDA_APT} \ cuda-nvrtc-${CUDA_APT} cuda-nvrtc-dev-${CUDA_APT} \
cuda-nvprof-${CUDA_APT} cuda-nvprof-${CUDA_APT} cuda-profiler-api-${CUDA_APT}
sudo apt-get clean sudo apt-get clean
export CUDA_HOME=/usr/local/cuda-${CUDA_VERSION} export CUDA_HOME=/usr/local/cuda-${CUDA_VERSION}
......
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