diff --git a/cmd/nvidia-container-runtime/nvcr_test.go b/cmd/nvidia-container-runtime/nvcr_test.go index 65cfa524..5650e635 100644 --- a/cmd/nvidia-container-runtime/nvcr_test.go +++ b/cmd/nvidia-container-runtime/nvcr_test.go @@ -18,7 +18,6 @@ package main import ( "fmt" - "os" "strings" "testing" @@ -29,15 +28,12 @@ import ( ) func TestArgsGetConfigFilePath(t *testing.T) { - wd, err := os.Getwd() - require.NoError(t, err) - testCases := []struct { bundleDir string ociSpecPath string }{ { - ociSpecPath: fmt.Sprintf("%v/config.json", wd), + ociSpecPath: "config.json", }, { bundleDir: "/foo/bar", diff --git a/cmd/nvidia-container-runtime/runtime_factory.go b/cmd/nvidia-container-runtime/runtime_factory.go index 3075da95..151de77a 100644 --- a/cmd/nvidia-container-runtime/runtime_factory.go +++ b/cmd/nvidia-container-runtime/runtime_factory.go @@ -154,11 +154,10 @@ func isBundleFlag(arg string) bool { } // getOCISpecFilePath returns the expected path to the OCI specification file for the given -// bundle directory or the current working directory if not specified. +// bundle directory. If the bundle directory is empty, only `config.json` is returned. func getOCISpecFilePath(bundleDir string) (string, error) { logger.Infof("Using bundle directory: %v", bundleDir) - // if bundleDir not specified, use "config.json" directly as cwd will always be the bundle path OCISpecFilePath := filepath.Join(bundleDir, ociSpecFileName) logger.Infof("Using OCI specification file path: %v", OCISpecFilePath) diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 3b9b6e43..7cda74a0 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,5 +1,7 @@ nvidia-container-toolkit (1.6.0~rc.2-1) experimental; urgency=medium + * Use relative path to OCI specification file (config.json) if bundle path is not specified as an argument to the nvidia-container-runtime + -- NVIDIA CORPORATION Tue, 26 Oct 2021 12:24:05 +0200 nvidia-container-toolkit (1.6.0~rc.1-1) experimental; urgency=medium diff --git a/packaging/rpm/SPECS/nvidia-container-toolkit.spec b/packaging/rpm/SPECS/nvidia-container-toolkit.spec index 874d1394..2e0bd3db 100644 --- a/packaging/rpm/SPECS/nvidia-container-toolkit.spec +++ b/packaging/rpm/SPECS/nvidia-container-toolkit.spec @@ -67,6 +67,8 @@ rm -f %{_bindir}/nvidia-container-runtime-hook * Tue Oct 26 2021 NVIDIA CORPORATION 1.6.0-0.1.rc.2 +- Use relative path to OCI specification file (config.json) if bundle path is not specified as an argument to the nvidia-container-runtime + * Mon Sep 06 2021 NVIDIA CORPORATION 1.6.0-0.1.rc.1 - Add AARCH64 package for Amazon Linux 2