diff --git a/cmd/gpu_plugin/gpu_plugin.go b/cmd/gpu_plugin/gpu_plugin.go index 095127f50..f048b13d5 100644 --- a/cmd/gpu_plugin/gpu_plugin.go +++ b/cmd/gpu_plugin/gpu_plugin.go @@ -257,7 +257,7 @@ func (dp *devicePlugin) bypathMountsForPci(pciAddress, bypathDir string) []plugi mounts = append(mounts, pluginapi.Mount{ ContainerPath: absPath, HostPath: absPath, - ReadOnly: false, + ReadOnly: true, }) } } @@ -529,7 +529,7 @@ func (dp *devicePlugin) createMountsAndCDIDevices(cardPath, name string, devSpec HostPath: mount.HostPath, ContainerPath: mount.ContainerPath, Type: "none", - Options: []string{"bind", "rw"}, + Options: []string{"bind", "ro"}, }) }