R
Railwayā€¢11mo ago
Sang Dang

Mount a volume into current Jupyter lab service, now I got Permission deny

I use this Docker https://github.com/jupyter/docker-stacks/blob/main/images/scipy-notebook/Dockerfile Today I mounted a volume into current Jupyter lab service. It works but I can not create new notebook with the Permission denied error. I Googled and see some instructions https://github.com/jupyter/docker-stacks/issues/1187 tell using --user root when starting. I do not know Docker enough to draft a custom start command in this case. I tried docker run --user root -e but the build crashed šŸ™ˆ Appreciate your help.
GitHub
docker-stacks/images/scipy-notebook/Dockerfile at main Ā· jupyter/do...
Ready-to-run Docker images containing Jupyter applications - jupyter/docker-stacks
GitHub
Volume: Permission denied Ā· Issue #1187 Ā· jupyter/docker-stacks
What docker image you are using? jupyter/minimal-notebook What complete docker command do you run to launch the container (omitting sensitive values)? # Creating a volume with docker create -- volu...
No description
No description
Solution:
i didnt forget about this, heres the new (refreshed) template! https://railway.app/template/WpjhAn the template was transferred to me, and railway now supports deploying images from quay.io persistent storage works across deploys without issue, this template is good to go!...
Jump to solution
28 Replies
Percy
Percyā€¢11mo ago
Project ID: 2620c66b-7c47-4dce-b6b8-22754da58d9e
Sang Dang
Sang DangOPā€¢11mo ago
2620c66b-7c47-4dce-b6b8-22754da58d9e
Brody
Brodyā€¢11mo ago
you are not the first person to think that you would be able to change the docker run command, it's not possible, but do you think you could let me know why you thought it would be? the start command is ran inside the container so to speak, you aren't modifying anything that railway is running outside of the container like the actual command to start the container. with that said, you want to set the RAILWAY_RUN_UID service variable to 1 edit: 0
Sang Dang
Sang DangOPā€¢11mo ago
thanks @Brody , my current problem is the Jupyter lab service does not "remember" my notebook, when it's redeployed, all my notebooks gone, so I think I need to add a volume to keep it, the next problem is most of tutorials are for Docker running in VPS, so when using Railway I do not have enough knowledge to cherry pick the things to make it works
Brody
Brodyā€¢11mo ago
gotcha, but yeah you can't change the actual command that railway runs the image with, that would be crazy insecure, you can only modify the start command (entrypoint) of the container
Sang Dang
Sang DangOPā€¢11mo ago
so you mean I should keep the volumn, but add the RAILWAY_RUN_UID=1?
Brody
Brodyā€¢11mo ago
yes edit: nope, you want 0, I miss-spoke
Sang Dang
Sang DangOPā€¢11mo ago
I got lot of error like this:
Sang Dang
Sang DangOPā€¢11mo ago
1 sec
Brody
Brodyā€¢11mo ago
bruh I'm dumb, you want to set that variable to 0. 0 is the root user, not 1. congratulations on being the very first question I answered after I woke up
Sang Dang
Sang DangOPā€¢11mo ago
it still has permission denied on the default work folder, BUT, after I created new folder, I can create new notebook inside it šŸ¤·ā€ā™‚ļø dont know why
Brody
Brodyā€¢11mo ago
maybe the folder didn't exist, I'm not sure where the notebook wants a volume mounted to or anything like that so I couldn't say
Sang Dang
Sang DangOPā€¢11mo ago
ok I will try to guess around, but the key here is use the variable 0 to have root user permission, right? damn, it still lose my files after redeploying šŸ˜¢
Brody
Brodyā€¢11mo ago
the volume is mounted as root and if the docker image isn't running as root then it won't be able to write to the volume, we use that variable to run the image as root anyway. if the files aren't persisting then the volume isn't mounted to the correct location
Brody
Brodyā€¢11mo ago
link me to the docker image you are using please
Brody
Brodyā€¢11mo ago
that's the link I was looking for you are using the image from quay.io right?
Sang Dang
Sang DangOPā€¢11mo ago
I guess yes, based on the dockerfile
Brody
Brodyā€¢11mo ago
okay I'll try some things myself
Sang Dang
Sang DangOPā€¢11mo ago
I don't mind to change the whole thing, like use other template, my main target is running python scripts in a pad like jupyter so I can quickly test some ideas so you can suggest anything if you know also not really urgent, you can have a coffee first šŸ˜›
Brody
Brodyā€¢11mo ago
while you can use the bookmarklet to deploy an image from quay.io, you cant make a template with a quay.io image (yet)
Solution
Brody
Brodyā€¢11mo ago
i didnt forget about this, heres the new (refreshed) template! https://railway.app/template/WpjhAn the template was transferred to me, and railway now supports deploying images from quay.io persistent storage works across deploys without issue, this template is good to go!
Sang Dang
Sang DangOPā€¢11mo ago
Thanks Brody, it works perfectly!!!
Brody
Brodyā€¢11mo ago
awsome!
Want results from more Discord servers?
Add your server