Commit Graph

2244 Commits

Author SHA1 Message Date
Evan Lezar
a4956e65d0
Add rprivate to CDI mount options
This ensures that mount propagation is set to rprivate for
mounts from the host into the container. This aligns with the
default in docker.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-03-10 10:50:32 +02:00
Evan Lezar
3df59b955a
Merge pull request #978 from NVIDIA/dependabot/go_modules/main/tags.cncf.io/container-device-interface-1.0.0
Some checks failed
CI Pipeline / code-scanning (push) Has been cancelled
CI Pipeline / variables (push) Has been cancelled
CI Pipeline / golang (push) Has been cancelled
CI Pipeline / image (push) Has been cancelled
CI Pipeline / e2e-test (push) Has been cancelled
Bump tags.cncf.io/container-device-interface from 0.8.1 to 1.0.0
2025-03-10 10:45:38 +02:00
Evan Lezar
33280cd2b2 [no-relnote] Address stricter validation
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-03-10 10:41:40 +02:00
Evan Lezar
3306d5081e [no-relnote] Output sorted specs
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-03-10 10:41:40 +02:00
Evan Lezar
7c3ab75d08 [no-relnote] Update cdi.CurrentVersion reference
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-03-10 10:41:40 +02:00
dependabot[bot]
71985df972 Bump tags.cncf.io/container-device-interface from 0.8.1 to 1.0.0
Bumps [tags.cncf.io/container-device-interface](https://github.com/cncf-tags/container-device-interface) from 0.8.1 to 1.0.0.
- [Release notes](https://github.com/cncf-tags/container-device-interface/releases)
- [Changelog](https://github.com/cncf-tags/container-device-interface/blob/main/RELEASE.md)
- [Commits](https://github.com/cncf-tags/container-device-interface/compare/v0.8.1...v1.0.0)

---
updated-dependencies:
- dependency-name: tags.cncf.io/container-device-interface
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-10 10:41:40 +02:00
Evan Lezar
4255d73d89
Merge pull request #981 from NVIDIA/dependabot/submodules/main/third_party/libnvidia-container-95d3e86
Bump third_party/libnvidia-container from `f23e5e5` to `95d3e86`
2025-03-10 10:40:48 +02:00
dependabot[bot]
9bdb74aec2
Bump third_party/libnvidia-container from f23e5e5 to 95d3e86
Bumps [third_party/libnvidia-container](https://github.com/NVIDIA/libnvidia-container) from `f23e5e5` to `95d3e86`.
- [Release notes](https://github.com/NVIDIA/libnvidia-container/releases)
- [Commits](f23e5e55ea...95d3e86522)

---
updated-dependencies:
- dependency-name: third_party/libnvidia-container
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-10 08:34:52 +00:00
Evan Lezar
e436533a6f
Merge pull request #968 from elezar/allow-hooks-disable
Some checks failed
CI Pipeline / code-scanning (push) Has been cancelled
CI Pipeline / variables (push) Has been cancelled
CI Pipeline / golang (push) Has been cancelled
CI Pipeline / image (push) Has been cancelled
CI Pipeline / e2e-test (push) Has been cancelled
Allow enable-cuda-compat hook to be disabled in CDI spec generation
2025-03-07 16:54:34 +02:00
Evan Lezar
0f299c3431 Disable enable-cuda-compat hook for management containers
Management containers don't generally need forward compatibility.
We disable the enable-cuda-compat hook to not include this in the
generated CDI specifications.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-03-07 16:54:09 +02:00
Evan Lezar
f852043078 Allow enable-cuda-compat hook to be disabled in CDI spec generation
This change adds support to the nvcdi package to opt out of specific hooks.

Currently only the `enable-cuda-compat` hook is supported. This allows clients to
generate a CDI spec that is compatible with older nvidia-cdi-hook CLIs.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-03-07 16:54:09 +02:00
Carlos Eduardo Arango Gutierrez
ef0b16bc24
Merge pull request #966 from NVIDIA/dependabot/go_modules/tests/main/golang.org/x/crypto-0.36.0
Bump golang.org/x/crypto from 0.35.0 to 0.36.0 in /tests
2025-03-07 15:40:44 +01:00
dependabot[bot]
225dfec83f
Bump golang.org/x/crypto from 0.35.0 to 0.36.0 in /tests
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.35.0 to 0.36.0.
- [Commits](https://github.com/golang/crypto/compare/v0.35.0...v0.36.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 14:32:55 +00:00
Carlos Eduardo Arango Gutierrez
03c48a6824
Merge pull request #956 from NVIDIA/dependabot/go_modules/deployments/devel/main/github.com/golangci/golangci-lint-1.64.6
Bump github.com/golangci/golangci-lint from 1.64.5 to 1.64.6 in /deployments/devel
2025-03-07 15:16:06 +01:00
dependabot[bot]
6530826293
Bump github.com/golangci/golangci-lint in /deployments/devel
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.64.5 to 1.64.6.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/golangci/golangci-lint/compare/v1.64.5...v1.64.6)

---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 14:05:34 +00:00
Carlos Eduardo Arango Gutierrez
971fd195b3
Merge pull request #964 from NVIDIA/dependabot/go_modules/tests/main/github.com/onsi/ginkgo/v2-2.23.0
Bump github.com/onsi/ginkgo/v2 from 2.22.2 to 2.23.0 in /tests
2025-03-07 15:04:17 +01:00
dependabot[bot]
3b10afd0fe
Bump github.com/onsi/ginkgo/v2 from 2.22.2 to 2.23.0 in /tests
Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.22.2 to 2.23.0.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/ginkgo/compare/v2.22.2...v2.23.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 13:44:49 +00:00
Evan Lezar
6b7ed26fba
Merge pull request #963 from NVIDIA/dependabot/go_modules/main/github.com/urfave/cli/v2-2.27.6
Bump github.com/urfave/cli/v2 from 2.27.5 to 2.27.6
2025-03-07 15:43:32 +02:00
dependabot[bot]
8d5f1e2427
Bump github.com/urfave/cli/v2 from 2.27.5 to 2.27.6
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.27.5 to 2.27.6.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.27.5...v2.27.6)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-06 10:48:36 +00:00
Evan Lezar
d82a9ccd89
Merge pull request #961 from NVIDIA/dependabot/go_modules/main/golang.org/x/sys-0.31.0
Some checks failed
CI Pipeline / code-scanning (push) Has been cancelled
CI Pipeline / variables (push) Has been cancelled
CI Pipeline / golang (push) Has been cancelled
CI Pipeline / image (push) Has been cancelled
CI Pipeline / e2e-test (push) Has been cancelled
Bump golang.org/x/sys from 0.30.0 to 0.31.0
2025-03-06 12:47:14 +02:00
dependabot[bot]
8ac213e3e6
Bump golang.org/x/sys from 0.30.0 to 0.31.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.30.0 to 0.31.0.
- [Commits](https://github.com/golang/sys/compare/v0.30.0...v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-06 09:39:17 +00:00
Evan Lezar
0128762832
Merge pull request #962 from NVIDIA/dependabot/go_modules/main/golang.org/x/mod-0.24.0
Bump golang.org/x/mod from 0.23.0 to 0.24.0
2025-03-06 11:38:07 +02:00
dependabot[bot]
d7b150a2e6
Bump golang.org/x/mod from 0.23.0 to 0.24.0
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.23.0 to 0.24.0.
- [Commits](https://github.com/golang/mod/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-06 11:34:42 +02:00
Evan Lezar
57c917e3b1
[no-relnote] Use --exit-code instead of --quiet for mod check
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-03-06 11:33:48 +02:00
Evan Lezar
bc9ec77fdd
Merge pull request #943 from elezar/add-disable-imex-channels-feature
Some checks failed
CI Pipeline / code-scanning (push) Has been cancelled
CI Pipeline / variables (push) Has been cancelled
CI Pipeline / golang (push) Has been cancelled
CI Pipeline / image (push) Has been cancelled
CI Pipeline / e2e-test (push) Has been cancelled
Add ignore-imex-channel-requests feature flag
2025-02-28 17:53:28 +02:00
Evan Lezar
82f2eb7b73
Merge pull request #949 from NVIDIA/dependabot/go_modules/main/github.com/opencontainers/runtime-spec-1.2.1
Bump github.com/opencontainers/runtime-spec from 1.2.0 to 1.2.1
2025-02-28 14:49:09 +02:00
dependabot[bot]
712d829018
Bump github.com/opencontainers/runtime-spec from 1.2.0 to 1.2.1
Bumps [github.com/opencontainers/runtime-spec](https://github.com/opencontainers/runtime-spec) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/opencontainers/runtime-spec/releases)
- [Changelog](https://github.com/opencontainers/runtime-spec/blob/main/ChangeLog)
- [Commits](https://github.com/opencontainers/runtime-spec/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runtime-spec
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-28 12:01:30 +00:00
Evan Lezar
598b9740fc
Merge pull request #941 from elezar/seal-ldconfig
Use memfd when running ldconfig
2025-02-28 14:00:23 +02:00
Evan Lezar
968e2ccca4
Merge pull request #906 from elezar/add-compat-lib-hook
Add CUDA forward compatibility hook
2025-02-27 17:25:19 +02:00
Evan Lezar
aff9301f2e
Add disable-cuda-compat-lib-hook feature flag
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-02-27 15:58:15 +02:00
Evan Lezar
011fb72330
Add basic integration tests for forward compat
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-02-27 15:58:15 +02:00
Evan Lezar
2adef9903e
Ensure that mode hook is executed last
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-02-27 15:58:15 +02:00
Evan Lezar
70b1f5af98
Add enable-cuda-compat hook to CDI spec generation
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-02-27 15:58:15 +02:00
Evan Lezar
c9422f12b3
[no-relnote] Add basic CDI generate test
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-02-27 15:58:15 +02:00
Evan Lezar
b7fbd56f7e
Add ldconfig hook in legacy mode
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-02-27 15:58:15 +02:00
Evan Lezar
bd87c009ba
Add enable-cuda-compat hook if required
This change adds the enable-cuda-compat hook to the incomming OCI runtime spec
if the allow-cuda-compat-libs-from-container feature flag is not enabled.

An update-ldcache hook is also injected to ensure that the required folders
are processed.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-02-27 15:58:15 +02:00
Evan Lezar
fc65d3a784
Add enable-cuda-compat hook to allow compat libs to be discovered
This change adds an nvidia-cdi-hook enable-cuda-compat hook that checks the
container for cuda compat libs and updates /etc/ld.so.conf.d to include their
parent folder if their driver major version is sufficient.

This allows CUDA Forward Compatibility to be used when this is not available
through the libnvidia-container.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-02-27 15:58:15 +02:00
Evan Lezar
52b9631333
Use libcontainer execseal to run ldconfig
This change copies ldconfig into a memfd before executing it from
the createContainer hook.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-02-27 13:52:27 +02:00
Evan Lezar
9429fbac5f
[no-relnote] Move root to separate file
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-02-27 13:48:29 +02:00
Evan Lezar
04e9bf4ac1
Merge pull request #937 from NVIDIA/dependabot/go_modules/main/tags.cncf.io/container-device-interface-0.8.1
Bump tags.cncf.io/container-device-interface from 0.8.0 to 0.8.1
2025-02-27 11:22:09 +02:00
Evan Lezar
3ceaf1f85c
Merge pull request #938 from NVIDIA/dependabot/go_modules/tests/main/golang.org/x/crypto-0.35.0
Bump golang.org/x/crypto from 0.33.0 to 0.35.0 in /tests
2025-02-27 11:12:45 +02:00
Evan Lezar
9f0c1042c4
Merge pull request #935 from elezar/disable-nvsandboxutils
Disable nvsandboxutils in nvcdi API
2025-02-27 11:07:42 +02:00
Evan Lezar
352b55c8ce
Add ignore-imex-channel-requests feature flag
This allows the NVIDIA Container Toolkit to ignore IMEX channel requests
through the NVIDIA_IMEX_CHANNELS envvar or volume mounts and ensures that
the NVIDIA Container Toolkit cannot be used to provide out-of-band access
to an IMEX channel by simply specifying an environment variable, possibly
bypassing other checks by an orchestration system such as kubernetes.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-02-26 17:46:36 +02:00
Evan Lezar
b13139793b
Disable nvsandboxutils in nvcdi API
Repeated calls to nvsandboxutils.Init and Shutdown are causing
segmentation violations. Here we disabled nvsandbox utils unless explicitly
specified.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-02-26 14:45:22 +02:00
dependabot[bot]
05f44b7752
Bump golang.org/x/crypto from 0.33.0 to 0.35.0 in /tests
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.33.0 to 0.35.0.
- [Commits](https://github.com/golang/crypto/compare/v0.33.0...v0.35.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-25 09:12:04 +00:00
dependabot[bot]
a109f28cb6
Bump tags.cncf.io/container-device-interface from 0.8.0 to 0.8.1
Bumps [tags.cncf.io/container-device-interface](https://github.com/cncf-tags/container-device-interface) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/cncf-tags/container-device-interface/releases)
- [Commits](https://github.com/cncf-tags/container-device-interface/compare/v0.8.0...v0.8.1)

---
updated-dependencies:
- dependency-name: tags.cncf.io/container-device-interface
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-25 09:11:59 +00:00
Evan Lezar
65b575fa96
Merge pull request #933 from elezar/move-wrapper
Some checks failed
CI Pipeline / code-scanning (push) Has been cancelled
CI Pipeline / variables (push) Has been cancelled
CI Pipeline / golang (push) Has been cancelled
CI Pipeline / image (push) Has been cancelled
CI Pipeline / e2e-test (push) Has been cancelled
[no-relnote] Move nvcdi wrapper to separate file
2025-02-21 22:43:45 +02:00
Evan Lezar
6e413d8445
[no-relnote] Move nvcdi wrapper to separate file
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2025-02-20 23:23:22 +02:00
Evan Lezar
5d9b27f107
Merge pull request #925 from NVIDIA/dependabot/docker/deployments/devel/main/golang-1.24.0
Some checks failed
CI Pipeline / code-scanning (push) Has been cancelled
CI Pipeline / variables (push) Has been cancelled
CI Pipeline / golang (push) Has been cancelled
CI Pipeline / image (push) Has been cancelled
CI Pipeline / e2e-test (push) Has been cancelled
Bump golang from 1.23.6 to 1.24.0 in /deployments/devel
2025-02-17 17:27:25 +01:00
Evan Lezar
767aee913d
Merge pull request #922 from NVIDIA/dependabot/go_modules/deployments/devel/main/github.com/matryer/moq-0.5.3
Bump github.com/matryer/moq from 0.5.2 to 0.5.3 in /deployments/devel
2025-02-17 11:27:53 +01:00