Skip to content

Commit

Permalink
Inject CUDA/CUDNN url prefixes
Browse files Browse the repository at this point in the history
Connected to PLAT-600
  • Loading branch information
meatballhat committed Nov 21, 2024
1 parent 538e62f commit dc032aa
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
check:
name: Check
runs-on: ubuntu-latest
env:
R8_CUDA_PREFIX: ${{ secrets.R8_CUDA_PREFIX }}
R8_CUDNN_PREFIX: ${{ secrets.R8_CUDNN_PREFIX }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
Expand All @@ -26,6 +29,9 @@ jobs:
test:
name: Test
runs-on: ubuntu-latest-4-cores
env:
R8_CUDA_PREFIX: ${{ secrets.R8_CUDA_PREFIX }}
R8_CUDNN_PREFIX: ${{ secrets.R8_CUDNN_PREFIX }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
Expand All @@ -35,6 +41,9 @@ jobs:
test-mini:
name: Test Mini
runs-on: ubuntu-latest-4-cores
env:
R8_CUDA_PREFIX: ${{ secrets.R8_CUDA_PREFIX }}
R8_CUDNN_PREFIX: ${{ secrets.R8_CUDNN_PREFIX }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
Expand Down
25 changes: 21 additions & 4 deletions src/monobase/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
import os


def getenv_or(key: str, default: str) -> str:
value = os.environ.get(key)
if value is None:
return default
value = value.strip()
if value == '':
return default
return value


# https://developer.nvidia.com/cuda-downloads
# cuda_prefix = 'https://developer.download.nvidia.com/compute/cuda'
cuda_prefix = 'https://pub-6c9cea068aa64db094559c4435a8b142.r2.dev/cuda'
cuda_prefix = getenv_or(
'R8_CUDA_PREFIX',
'https://developer.download.nvidia.com/compute/cuda',
)

cuda_urls = [
f'{cuda_prefix}/cuda_12.6.2_560.35.03_linux.run',
Expand Down Expand Up @@ -29,8 +44,10 @@
]

# https://developer.nvidia.com/cudnn-downloads
# cudnn_prefix = 'https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64'
cudnn_prefix = 'https://pub-6c9cea068aa64db094559c4435a8b142.r2.dev/cudnn'
cudnn_prefix = getenv_or(
'R8_CUDNN_PREFIX',
'https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64',
)

cudnn_urls = [
f'{cudnn_prefix}/cudnn-linux-x86_64-9.5.0.50_cuda12-archive.tar.xz',
Expand Down

0 comments on commit dc032aa

Please sign in to comment.