Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running terra-jupyter-r locally on gcp vm #435

Open
MiTPenguin opened this issue Jun 28, 2023 · 1 comment
Open

Running terra-jupyter-r locally on gcp vm #435

MiTPenguin opened this issue Jun 28, 2023 · 1 comment

Comments

@MiTPenguin
Copy link

Hello Terra team,

I'm testing running the terra-jupyter images (particularly the r and python images) on my own gcp VM, as an alternative to running the images on Terra.

It all works reasonably well, with some additional entrypoint parameters. Here's what I use to run an image on a vm with debian 11:

docker run -it -p 8000:8000 -v /home/$USER:/home/jupyter/data --entrypoint "/opt/conda/bin/jupyter" \
us.gcr.io/broad-dsp-gcr-public/terra-jupyter-r:2.1.10 lab --port=8000 --allow-root --ip=0.0.0.0 --no-browser

Jupyter lab then gets launched at port 8000, where I can log in with a token.

However, I am not able to write any file into my mounted volume data/. There's a permission issue, and attempts to sudo chown the directory runs into the issue of requiring password for root access, which I can't seem to figure out.

Any idea on how to proceed? the already install package list on the terra images are very convenient for me, so getting it to work would be great.

@sabrinacamp2
Copy link

sabrinacamp2 commented Jul 24, 2023

You need to allow the jupyter user to have read/write permissions in your mounted volume prior to running the docker by referencing it's gid and uid in the chown command (e.g. 1000, 100).

sudo chown -R 1000:100 /path/to/volume

Now, when you run docker and mount data/, the jupyter user can read/write to it.

See this stack overflow post for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants