Skip to content

Cache NVIDIA Dependencies #3

Cache NVIDIA Dependencies

Cache NVIDIA Dependencies #3

# Simple workflow to cache NVIDIA dependencies
# Run this once to populate the cache, then disable or delete
name: Cache NVIDIA Dependencies
on:
workflow_dispatch:
jobs:
cache-deps:
runs-on: windows-2025
strategy:
matrix:
include:
- cuda-version: '12'
cache-key: 'nvidia-deps-cuda-12.9.1-cudnn-9.18.1.3'
- cuda-version: '13'
cache-key: 'nvidia-deps-cuda-13.1.1-cudnn-9.18.1.3'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: false
fetch-depth: 1
- name: Cache NVIDIA dependencies (CUDA ${{ matrix.cuda-version }})
id: cache-nvidia-deps
uses: actions/cache@v3
with:
path: .deps/Nvidia
key: ${{ matrix.cache-key }}
- name: Clone NVIDIA dependencies
if: steps.cache-nvidia-deps.outputs.cache-hit != 'true'
env:
SSH_PRIVATE_KEY: ${{ secrets.DEPS_REPO_SSH_KEY }}
run: |
eval "$(ssh-agent -s)"
ssh-add - <<< "${SSH_PRIVATE_KEY}"
ssh-keyscan github.com >> ~/.ssh/known_hosts 2>/dev/null
git clone git@github.com:Breakthrough/opencv-python-cuda-deps.git .deps
shell: bash
- name: Cache populated
run: |
echo "NVIDIA dependencies for CUDA ${{ matrix.cuda-version }} cached successfully!"
ls -la .deps/Nvidia/ || echo "Cache was already populated"
shell: bash