mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-25 21:39:10 +00:00
Ensure that parent directories exist for config files
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
baf94181aa
commit
6342dae0e9
@ -13,10 +13,13 @@
|
|||||||
* Fix bug in creation of `/dev/char` symlinks by failing operation if kernel modules are not loaded.
|
* Fix bug in creation of `/dev/char` symlinks by failing operation if kernel modules are not loaded.
|
||||||
* Add option to load kernel modules when creating device nodes
|
* Add option to load kernel modules when creating device nodes
|
||||||
* Add option to create device nodes when creating `/dev/char` symlinks
|
* Add option to create device nodes when creating `/dev/char` symlinks
|
||||||
* Bump CUDA base image version to 12.1.1.
|
* Create ouput folders if required when running `nvidia-ctk runtime configure`
|
||||||
|
|
||||||
|
|
||||||
* [libnvidia-container] Support OpenSSL 3 with the Encrypt/Decrypt library
|
* [libnvidia-container] Support OpenSSL 3 with the Encrypt/Decrypt library
|
||||||
|
|
||||||
|
* [toolkit-container] Bump CUDA base image version to 12.1.1.
|
||||||
|
|
||||||
## v1.13.1
|
## v1.13.1
|
||||||
|
|
||||||
* Update `update-ldcache` hook to only update ldcache if it exists.
|
* Update `update-ldcache` hook to only update ldcache if it exists.
|
||||||
|
@ -19,6 +19,7 @@ package engine
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"path/filepath"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Config represents a runtime config
|
// Config represents a runtime config
|
||||||
@ -43,6 +44,13 @@ func (c Config) Write(output []byte) (int, error) {
|
|||||||
return 0, nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if dir := filepath.Dir(path); dir != "" {
|
||||||
|
err := os.MkdirAll(dir, 0755)
|
||||||
|
if err != nil {
|
||||||
|
return 0, fmt.Errorf("unable to create directory %v: %v", dir, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
f, err := os.Create(path)
|
f, err := os.Create(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, fmt.Errorf("unable to open %v for writing: %v", path, err)
|
return 0, fmt.Errorf("unable to open %v for writing: %v", path, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user