Docker Community Forums

Share and learn in the Docker community.

Make environment variable unwritable


(Patrick0123) #1

I have a machine learning rig with 6 v100’s and people can access them through jupyter inside a docker container. I wanna control who uses which graphic card so I have to set the env variable.

So, i wanna set the Env variable NVIDIA_VISIBLE_DEVICES to a specific graphic card. But in jupyter (runs on the docker container) users can edit this variable and so everyone could access every GPU.

How can I make the env variable unwritable?

######## UPDATE ########
Already found it out!
Set the variable readonly (readonly NVIDIA_VISIBLE_DEVICES) like in the .bashrc