R
Railwayβ€’6mo 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β€’6mo ago
Project ID: 2620c66b-7c47-4dce-b6b8-22754da58d9e
Sang Dang
Sang Dangβ€’6mo ago
2620c66b-7c47-4dce-b6b8-22754da58d9e
Brody
Brodyβ€’6mo 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β€’6mo 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β€’6mo 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β€’6mo ago
so you mean I should keep the volumn, but add the RAILWAY_RUN_UID=1?
Brody
Brodyβ€’6mo ago
yes edit: nope, you want 0, I miss-spoke
Sang Dang
Sang Dangβ€’6mo ago
I got lot of error like this:
Sang Dang
Sang Dangβ€’6mo ago
1 sec
Brody
Brodyβ€’6mo 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β€’6mo 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β€’6mo 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β€’6mo 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β€’6mo 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β€’6mo ago
link me to the docker image you are using please
Brody
Brodyβ€’6mo ago
that's the link I was looking for you are using the image from quay.io right?
Sang Dang
Sang Dangβ€’6mo ago
I guess yes, based on the dockerfile
Brody
Brodyβ€’6mo ago
okay I'll try some things myself
Sang Dang
Sang Dangβ€’6mo 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β€’6mo 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β€’6mo 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β€’6mo ago
Thanks Brody, it works perfectly!!!
Brody
Brodyβ€’6mo ago
awsome!
Want results from more Discord servers?
Add your server
More Posts
ImportError: libGL.so.1: cannot open shared object file: No such file or directoryrequirements.txt aiohttp==3.8.6 aiosignal==1.3.1 amqp==5.1.1 annotated-types==0.6.0 anyio==3.7.1 asApplication activated and no error on the terminal, but service unavailableUsing DOCKERFILE the application is built correctly without any errors. No errors in the terminal, eIs there a way I can delete a table in my Postgres pluginHi, I did a stupid mistake and migrated a table that was intended for development to production, howFirewall questionsHey Just had a question about how the lack of firewall feature in the UI. I'm used too being able tEncountered error when aborting an additional repo service deployEncountered an error when aborting an additional repo service deploy, may not have any relevance or Can I get dump of databaseHello, I have an old database I forgot about in railway. It is suspended, can I get a dump of that dDeploy template button grayed out for existing projectHello! I am on the Hobby plan and I have a project that currently has 5 services added. I'm trying tNot skipping build/deployment for changes outside root directoryI have a monorepo setup, where I have a folder called `apps` that contains different services. I havHobby plan subscription fee waived"a small set of active builders on the platform" I'd like to know how I'm going to get thereMigration failed at "Migrate data" stepI'm trying to migrate my postgre database to the latest version but I have this error. Project id :