-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: NVIDIA CUDA flat repos don't follow Debian repo spec
Although the Debian repo spec for 'Filename' (see https://wiki.debian.org/DebianRepository/Format#Filename) clearly says that 'Filename' should be relative to the base directory of the repo and should be in canonical form (i.e. without '.' or '..') there are cases where this is not honored. In those cases we try to work around this by assuming 'Filename' is relative to the sources.list directory/ so we combine them and normalize the new 'Filename' path. Note that, so far, only the NVIDIA CUDA repos needed this workaround so maybe this heuristic will break for other repos that don't conform to the Debian repo spec.
- Loading branch information
Showing
14 changed files
with
203 additions
and
24 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,6 +68,7 @@ bzl_library( | |
deps = [ | ||
":nested_dict", | ||
":version_constraint", | ||
"@bazel_skylib//lib:paths", | ||
], | ||
) | ||
|
||
|
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
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
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
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
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
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
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
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
23 changes: 23 additions & 0 deletions
23
examples/debian_flat_repo/nvidia_ubuntu2404_cuda.lock.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"packages": { | ||
"nvidia-container-toolkit-base": { | ||
"amd64": { | ||
"arch": "amd64", | ||
"dependencies": [], | ||
"name": "nvidia-container-toolkit-base", | ||
"sha256": "a28af3f9a0e88ae04a9f346375c85f4609c8320dbaf1136af7522b54a24f53be", | ||
"url": "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/nvidia-container-toolkit-base_1.17.2-1_amd64.deb", | ||
"version": "1.17.2-1" | ||
}, | ||
"arm64": { | ||
"arch": "arm64", | ||
"dependencies": [], | ||
"name": "nvidia-container-toolkit-base", | ||
"sha256": "55f242746c244b2582fc354f57b5cf7fa467b8dec5105fc39f9f46602b8db590", | ||
"url": "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/arm64/nvidia-container-toolkit-base_1.17.2-1_arm64.deb", | ||
"version": "1.17.2-1" | ||
} | ||
} | ||
}, | ||
"version": 2 | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Packages for examples/debian_flat_repo. | ||
# | ||
# Anytime this file is changed, the lockfile needs to be regenerated. | ||
# | ||
# To generate the nvidia_cuda.lock.json run the following command | ||
# | ||
# bazel run @nvidia_ubuntu2404_cuda//:lock | ||
# | ||
# See debian_package_index at WORKSPACE.bazel | ||
version: 1 | ||
|
||
sources: | ||
- channel: ubuntu2404/x86_64/ | ||
url: https://developer.download.nvidia.com/compute/cuda/repos | ||
- channel: ubuntu2404/arm64/ | ||
url: https://developer.download.nvidia.com/compute/cuda/repos | ||
|
||
archs: | ||
- amd64 | ||
- arm64 | ||
|
||
packages: | ||
- nvidia-container-toolkit-base |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
schemaVersion: "2.0.0" | ||
|
||
commandTests: | ||
- name: "apt list --installed" | ||
command: "apt" | ||
args: ["list", "--installed"] | ||
expectedOutput: | ||
- Listing\.\.\. | ||
- nvidia-container-toolkit-base/now 1.17.2-1 arm64 \[installed,local\] |