@@ -37,6 +37,7 @@ func createParamsFileInContainer(containerRoot *os.Root, contents []byte) error
3737 return fmt .Errorf ("error creating hook scratch folder: %w" , err )
3838 }
3939
40+ //nolint:staticcheck // TODO (ArangoGutierrez): Remove the nolint:staticcheck and properly fix the deprecation warning.
4041 err := utils .WithProcfd (containerRootDirPath , hookScratchDirPath , func (hookScratchDirFdPath string ) error {
4142 return createTmpFs (hookScratchDirFdPath , len (contents ))
4243 })
@@ -49,6 +50,7 @@ func createParamsFileInContainer(containerRoot *os.Root, contents []byte) error
4950 return fmt .Errorf ("error creating modified params file: %w" , err )
5051 }
5152
53+ //nolint:staticcheck // TODO (ArangoGutierrez): Remove the nolint:staticcheck and properly fix the deprecation warning.
5254 err = utils .WithProcfd (containerRootDirPath , modifiedParamsFilePath , func (modifiedParamsFileFdPath string ) error {
5355 modifiedParamsFile , err := os .OpenFile (modifiedParamsFileFdPath , os .O_WRONLY | os .O_CREATE | os .O_TRUNC , 0444 )
5456 if err != nil {
@@ -60,6 +62,7 @@ func createParamsFileInContainer(containerRoot *os.Root, contents []byte) error
6062 return fmt .Errorf ("failed to write temporary params file: %w" , err )
6163 }
6264
65+ //nolint:staticcheck // TODO (ArangoGutierrez): Remove the nolint:staticcheck and properly fix the deprecation warning.
6366 err = utils .WithProcfd (containerRootDirPath , nvidiaDriverParamsPath , func (nvidiaDriverParamsFdPath string ) error {
6467 return unix .Mount (modifiedParamsFileFdPath , nvidiaDriverParamsFdPath , "" , unix .MS_BIND | unix .MS_RDONLY | unix .MS_NODEV | unix .MS_PRIVATE | unix .MS_NOSYMFOLLOW , "" )
6568 })
0 commit comments