Home > Net >  How to save data as a non-root user in a container?
How to save data as a non-root user in a container?

Time:10-27

I try to use docker in the cluster of my school.And I have add my accout into docker group.I run the container by:docker run -it -v ~/documents:/home/fenics/shared fenicsdrl1 /bin/bash.But I was told that I don't have the permissions when I tried to write my data into a file.Here are my error message: tensorflow.python.framework.errors_impl.PermissionDeniedError: log/tensorboard/_model=PPO2_default_Mlp1_step_1_episode_18CPU_time=2022-10-27_06_56_28_1; Permission denied

I tried to run this container by:docker run -it -v ~/documents:/home/fenics/shared fenicsdrl1 /bin/bash --privileged=true and docker run -it --user==$UID:$(id -g $USER) -v ~/documents:/home/fenics/shared fenicsdrl1 /bin/bash.But it didn't work.

Any advises would be appreciated:).

CodePudding user response:

I think you don't have write permission in ~/documents folder, you need create new folder with full permission and replace ~/documents by that new folder.

CodePudding user response:

Have you tried using the sudo command?

  • Related