This commit is contained in:
@@ -10,14 +10,16 @@ jobs:
|
||||
env:
|
||||
CUDA_VISIBLE_DEVICES: ""
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
- name: Checkout from Gitea
|
||||
run: |
|
||||
git init .
|
||||
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
|
||||
git fetch --depth 1 origin "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
- name: Reuse runner PyTorch and install lightweight dependencies
|
||||
run: |
|
||||
uv venv --system-site-packages --python python .venv-ci
|
||||
uv pip install --python .venv-ci/bin/python numpy pillow pyyaml scipy pytest ruff
|
||||
python -m venv --system-site-packages .venv-ci
|
||||
.venv-ci/bin/python -m pip install numpy pillow pyyaml scipy pytest ruff
|
||||
- name: Lint
|
||||
run: .venv-ci/bin/ruff check .
|
||||
- name: Unit tests
|
||||
|
||||
@@ -8,16 +8,18 @@ jobs:
|
||||
runs-on: gpu
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
- name: Checkout from Gitea
|
||||
run: |
|
||||
git init .
|
||||
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
|
||||
git fetch --depth 1 origin "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
- name: Verify CUDA
|
||||
run: nvidia-smi
|
||||
- name: Reuse runner PyTorch and install lightweight dependencies
|
||||
run: |
|
||||
uv venv --system-site-packages --python python .venv-gpu
|
||||
uv pip install --python .venv-gpu/bin/python numpy pillow pyyaml scipy transformers pytest ruff
|
||||
python -m venv --system-site-packages .venv-gpu
|
||||
.venv-gpu/bin/python -m pip install numpy pillow pyyaml scipy transformers pytest ruff
|
||||
- name: Verify PyTorch sees the GPU
|
||||
run: |
|
||||
.venv-gpu/bin/python -c "import torch; assert torch.cuda.is_available(); print(torch.__version__, torch.version.cuda, torch.cuda.get_device_name(), torch.cuda.get_device_capability())"
|
||||
|
||||
Reference in New Issue
Block a user