Skip to content

Commit

Permalink
Update CI versions (#122)
Browse files Browse the repository at this point in the history
* Update CI version

* Remove wildcard in CUDA version

* Fix CUDA version

* Try a different version

* Try to free disk space

* Free space sooner

* Another method of trying to free disk space

* Try a different method of installing CUDA

* Try a different method of installing CUDA

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Cleanup
  • Loading branch information
peastman authored Jan 30, 2025
1 parent 05d30d4 commit 6c1fcf8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 49 deletions.
63 changes: 18 additions & 45 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,6 @@ jobs:
include:

# Oldest supported versions
- name: Linux (CUDA 10.2, Python 3.8, PyTorch 1.11)
enable_cuda: true
cuda: "10.2.89"
gcc: "8.5.*"
nvcc: "10.2"
python: "3.8.*"
torchani: "2.2.*"
pytorch: "1.11.*"

# Older supported versions
- name: Linux (CUDA 11.2, Python 3.9, PyTorch 1.12)
enable_cuda: true
cuda: "11.2.2"
gcc: "10.3.*"
nvcc: "11.2"
python: "3.9.*"
torchani: "2.2.*"
pytorch: "1.12.*"

# Latest supported versions (with CUDA)
- name: Linux (CUDA 11.8, Python 3.10, PyTorch 2.0)
enable_cuda: true
cuda: "11.8.0"
Expand All @@ -52,54 +32,47 @@ jobs:
torchani: "2.2.*"
pytorch: "2.0.*"

# Latest supported versions (without CUDA)
- name: Linux (no CUDA, Python 3.10, PyTorch 2.0)
enable_cuda: false
# Latest supported versions (with CUDA)
- name: Linux (CUDA 12, Python 3.13, PyTorch 2.5)
enable_cuda: true
cuda: "12.6.0"
gcc: "10.3.*"
python: "3.10.*"
pytorch: "2.0.*"
nvcc: "12.*"
python: "3.13.*"
torchani: "2.2.*"
pytorch: "2.5.*"

steps:
- name: Check out
uses: actions/checkout@v2

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main

- name: Install CUDA Toolkit
uses: Jimver/[email protected].10
uses: Jimver/[email protected].21
with:
cuda: ${{ matrix.cuda }}
linux-local-args: '["--toolkit", "--override"]'
linux-local-args: '["--toolkit", "--override"]'
log-file-suffix: "${{ matrix.cuda }}.txt"
if: ${{ matrix.enable_cuda }}

- name: Install Miniconda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: ""
auto-activate-base: true
miniforge-variant: Mambaforge
miniforge-variant: Miniforge3
use-mamba: true

- name: Prepare dependencies (with CUDA)
if: ${{ matrix.enable_cuda }}
- name: Prepare dependencies
run: |
sed -i -e "/cudatoolkit/c\ - cudatoolkit ${{ matrix.cuda }}" \
-e "/gxx_linux-64/c\ - gxx_linux-64 ${{ matrix.gcc }}" \
sed -i -e "/gxx_linux-64/c\ - gxx_linux-64 ${{ matrix.gcc }}" \
-e "/torchani/c\ - torchani ${{ matrix.torchani }}" \
-e "/nvcc_linux-64/c\ - nvcc_linux-64 ${{ matrix.nvcc }}" \
-e "/python/c\ - python ${{ matrix.python }}" \
-e "/pytorch-gpu/c\ - pytorch-gpu ${{ matrix.pytorch }}" \
environment.yml
- name: Prepare dependencies (without CUDA)
if: ${{ !matrix.enable_cuda }}
run: |
sed -i -e "/cudatoolkit/c\ # - cudatoolkit" \
-e "/gxx_linux-64/c\ - gxx_linux-64 ${{ matrix.gcc }}" \
-e "/torchani/c\ - torchani ${{ matrix.torchani }}" \
-e "/nvcc_linux-64/c\ # - nvcc_linux-64" \
-e "/python/c\ - python ${{ matrix.python }}" \
-e "/pytorch-gpu/c\ - pytorch-cpu ${{ matrix.pytorch }}" \
environment.yml
- name: Show dependency file
run: cat environment.yml

Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ set(SRC_FILES src/ani/CpuANISymmetryFunctions.cpp
# Build the library
set(LIBRARY ${NAME}PyTorch)
add_library(${LIBRARY} SHARED ${SRC_FILES})
set_property(TARGET ${LIBRARY} PROPERTY CXX_STANDARD 14)
set_property(TARGET ${LIBRARY} PROPERTY CXX_STANDARD 17)
target_include_directories(${LIBRARY} PRIVATE ${Python3_INCLUDE_DIRS}
src/ani src/pytorch src/schnet)
target_link_libraries(${LIBRARY} ${TORCH_LIBRARIES} ${Python3_LIBRARIES})
if(ENABLE_CUDA)
set_property(TARGET ${LIBRARY} PROPERTY CUDA_STANDARD 14)
set_property(TARGET ${LIBRARY} PROPERTY CUDA_STANDARD 17)
target_compile_definitions(${LIBRARY} PRIVATE ENABLE_CUDA)
endif(ENABLE_CUDA)

Expand Down
2 changes: 0 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ channels:
- conda-forge
dependencies:
- cmake >=3.20
- cudatoolkit 11.8.*
- gxx_linux-64 10.3.*
- make
- mdtraj
- nvcc_linux-64 11.8
- torchani 2.2.*
- pytest
- python 3.10.*
Expand Down

0 comments on commit 6c1fcf8

Please sign in to comment.