install only the custom action with the toolkit argument #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.12"] | ||
env: | ||
OS: ${{ matrix.os }} | ||
# container: | ||
# image: nvidia/cuda:12.4-base | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
- name: Install CUDA Toolkit | ||
uses: Jimver/[email protected] | ||
with: | ||
cuda: "12.4.0" | ||
linux-local-args: ["--toolkit"] | ||
- name: Cleanup after cuda | ||
run: | | ||
sudo rm -rf /tmp/* | ||
sudo rm -rf ~/.cache/pip | ||
sudo apt-get clean | ||
sudo rm -rf /var/lib/apt/lists/* | ||
- name: Install dependencies | ||
run: | | ||
pip install .[test] | ||
- name: Cleanup after dependencies installation | ||
run: | | ||
sudo rm -rf /tmp/* | ||
sudo rm -rf ~/.cache/pip | ||
sudo apt-get clean | ||
sudo rm -rf /var/lib/apt/lists/* | ||
- name: Verify CUDA installation | ||
run: | | ||
nvcc --version | ||
python -c "import torch; print(torch.cuda.is_available())" |