R
Railwayβ€’10mo 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β€’10mo ago
Project ID: 2620c66b-7c47-4dce-b6b8-22754da58d9e
Sang Dang
Sang Dangβ€’10mo ago
2620c66b-7c47-4dce-b6b8-22754da58d9e
Brody
Brodyβ€’10mo 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 Dangβ€’10mo 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β€’10mo 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 Dangβ€’10mo ago
so you mean I should keep the volumn, but add the RAILWAY_RUN_UID=1?
Brody
Brodyβ€’10mo ago
yes edit: nope, you want 0, I miss-spoke
Sang Dang
Sang Dangβ€’10mo ago
I got lot of error like this:
Sang Dang
Sang Dangβ€’10mo ago
1 sec
Brody
Brodyβ€’10mo 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 Dangβ€’10mo 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β€’10mo 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 Dangβ€’10mo 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β€’10mo 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β€’10mo ago
link me to the docker image you are using please
Brody
Brodyβ€’10mo ago
that's the link I was looking for you are using the image from quay.io right?
Sang Dang
Sang Dangβ€’10mo ago
I guess yes, based on the dockerfile
Brody
Brodyβ€’10mo ago
okay I'll try some things myself
Sang Dang
Sang Dangβ€’10mo 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β€’10mo 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β€’10mo 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 Dangβ€’10mo ago
Thanks Brody, it works perfectly!!!
Brody
Brodyβ€’10mo ago
awsome!
Want results from more Discord servers?
Add your server