Skip to content

Commit

Permalink
nvproxy: remove outdated commentary
Browse files Browse the repository at this point in the history
Was reading through code and noticed these two instances of outdated commentary.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#11057 from thundergolfer:master f2026c0
PiperOrigin-RevId: 687485697
  • Loading branch information
thundergolfer authored and gvisor-bot committed Oct 19, 2024
1 parent 0b59173 commit 22144aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
12 changes: 3 additions & 9 deletions runsc/container/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -1937,7 +1937,7 @@ func nvproxyLoadKernelModules() {

// nvproxySetupAfterGoferUserns runs `nvidia-container-cli configure`.
// This sets up the container filesystem with bind mounts that allow it to
// use NVIDIA devices.
// use NVIDIA devices and libraries.
//
// This should be called during the Gofer setup process, as the bind mounts
// are created in the Gofer's mount namespace.
Expand All @@ -1953,14 +1953,8 @@ func nvproxyLoadKernelModules() {
// defined, such that nvidia-container-runtime-hook and existing runsc
// hooks differ in their expected environment.
//
// Note that nvidia-container-cli will set up files in /dev and /proc which
// are useless, since they will be hidden by sentry devtmpfs and procfs
// respectively (and some device files will have the wrong device numbers
// from the application's perspective since nvproxy may register device
// numbers in sentry VFS that differ from those on the host, e.g. for
// nvidia-uvm). These files are separately created during sandbox VFS
// construction. For this reason, we don't need to parse
// NVIDIA_VISIBLE_DEVICES or pass --device to nvidia-container-cli.
// Note that nvidia-container-cli will set up files /proc which
// are useless, since they will be hidden by sentry procfs.
func nvproxySetupAfterGoferUserns(spec *specs.Spec, conf *config.Config, goferCmd *exec.Cmd, goferDonations *donation.Agency) (func() error, error) {
if !specutils.GPUFunctionalityRequestedViaHook(spec, conf) {
return func() error { return nil }, nil
Expand Down
3 changes: 1 addition & 2 deletions runsc/specutils/nvidia.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ func ParseNvidiaVisibleDevices(spec *specs.Spec) (string, error) {
if nvd == "all" {
return "all", nil
}
// Expect nvd to be a list of indices; UUIDs aren't supported
// yet.

for _, gpuDev := range strings.Split(nvd, ",") {
// Validate gpuDev. We only support the following formats for now:
// * GPU indices (e.g. 0,1,2)
Expand Down

0 comments on commit 22144aa

Please sign in to comment.