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...
Solution:Jump to 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!...
28 Replies
Project ID:
2620c66b-7c47-4dce-b6b8-22754da58d9e
2620c66b-7c47-4dce-b6b8-22754da58d9e
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 edit:
RAILWAY_RUN_UID
service variable to 1
0
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
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
so you mean I should keep the volumn, but add the
RAILWAY_RUN_UID=1
?0
, I miss-spokeI got lot of error like this:
please use this https://bookmarklets.up.railway.app/log-downloader/
1 sec
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
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 whymaybe 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
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 š¢
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
Based on this https://jupyter-docker-stacks.readthedocs.io/en/latest/using/common.html#additional-runtime-configurations, I guess the path is
/home/jovyan/work
link me to the docker image you are using please
GitHub
docker-stacks/images/scipy-notebook/Dockerfile at main Ā· jupyter/do...
Ready-to-run Docker images containing Jupyter applications - jupyter/docker-stacks
that's the link I was looking for
you are using the image from quay.io right?
I guess yes, based on the dockerfile
okay I'll try some things myself
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
š
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
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!
Thanks Brody, it works perfectly!!!
awsome!