iot-salzburg / gpu-jupyter

GPU-Jupyter: Leverage the flexibility of Jupyterlab through the power of your NVIDIA GPU to run your code from Tensorflow and Pytorch in collaborative notebooks on the GPU.
Apache License 2.0
708 stars 235 forks source link

Permission denied. #67

Closed congdaoduy298 closed 2 years ago

congdaoduy298 commented 3 years ago

First of all, thank you for your repository. And may I ask you why I can not create a new notebook. I tried a lot of answer from google but nothing seem happens. I tried to pass many params to overcome that errors like -e GRANT_SUDO=yes --user root NB_UID=$(id -u) -e NB_GID=$(id -g) but I still can not create new notebook. Here is my full command: sudo docker run -it --rm -d -p 9012:8888 -v $(pwd):/home/jovyan/work/ -e NB_UID=$(id -u) -e NB_GID=$(id -g) -e GRANT_SUDO=yes --user root cschranz/gpu-jupyter:v1.4_cuda-11.0_ubuntu-20.04_python-only. I go to docker container and here is the error: PermissionError: [Errno 13] Permission denied: '/home/jovyan/work/Cong/wsi_ai/.ipynb_checkpoints/Untitled-checkpoint.ipynb' Thanks for any helps Screenshot from 2021-10-18 20-21-41 .

mathematicalmichael commented 3 years ago

can you try without -e NB_UID=$(id -u) -e NB_GID=$(id -g)? I dont think these should be required. As long as your $(pwd) has open permissions, should be okay. It looks like the app is trying to create an invisible file in a folder of yours called Cong and perhaps lacks permissions to.

You can run this variation to help test and rule out some possibilities regarding permissions for your existing files (create and mount a fresh empty directory): mkdir -p /tmp/work/ and replace your volume mount with -v /tmp/work/:/home/jovyan/work/

if you're able to create files and everything there then the root of the problem is with your files, you can try to run chmod -R 755 Cong and see if changing the permissions solves it. 777 as a hail-mary is a good first option.

congdaoduy298 commented 3 years ago

I tried without -e NB_UID=$(id -u) -e NB_GID=$(id -g) before I add it with an opinion that it can pass permissions from my user and can have all permissions from that user. Change chmod -R 755 still didn't work, and chmod -R 777 is working. But can I pass permissions from root user instead of change permissions to 777 ? Because if I use chmod -R 777 all of my files, directories within Cong will be public. I tried to run the command by root user but it seems notebook still using my user instead. Screenshot from 2021-10-19 09-59-28

ChristophSchranz commented 3 years ago

Hi, have you tried to run the command without root priviledges sudo and chmod -R 755?

ChristophSchranz commented 2 years ago

Closing as there were no contributions for a while. Please reopen, if the error still occurs.