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

Environment not persistent between sessions? #202

Open
rcpeene opened this issue Oct 3, 2024 · 2 comments
Open

Environment not persistent between sessions? #202

rcpeene opened this issue Oct 3, 2024 · 2 comments

Comments

@rcpeene
Copy link

rcpeene commented Oct 3, 2024

I think ever since the update where you select your environment upon launch, my environment no longer persists between sessions of Dandihub. This is a bit inconvenient since I have to reinstall The OpenScope Databook environment every time. Is there a way to manually save my environment?

@satra
Copy link
Member

satra commented Oct 3, 2024

@rcpeene - let's use this opportunity to create a specific image for openscope. @asmacdo - could you please point carter to instructions for adding an image? i will let you also address carter's issue. perhaps some initiation process is overwriting something.

@asmacdo
Copy link
Member

asmacdo commented Oct 3, 2024

@rcpeene each user has persistent storage under /home/jovyan, so you'll just need to use a virtual environment somewhere in there. (The default conda env is in /opt, which is not persistent.)

For example:

$ python -m venv ~/venvs/my_venv
$ source ~/venvs/my_venv/bin/activate
(my_venv) $ 

For creating a new image we've got a short blurb in the docs: https://www.dandiarchive.org/handbook/50_hub/#custom-server-image. However, that has a broken links, and there's a bit more to it... Lets just develop those docs as we go and update when you're finished, (also feel free to ping me in MIT slack).

First youll want to add a new Dockerfile, ie Dockerfile.openscope https://github.com/dandi/dandi-hub/tree/b2f344a23bc726a2ff8690d97fdff637be539e54/images

Once that's built and pushed to dockerhub, it can be added as an image choice to the jupyterhub configuration.

choices:
standard:
display_name: "Standard"
default: true
kubespawner_override:
image: "${singleuser_image_repo}:${singleuser_image_tag}"
matlab:
display_name: "MATLAB (must provide your own license)"
kubespawner_override:
image: "${singleuser_image_repo}:${singleuser_image_tag}-matlab"

We already have 2 choices, regular and Matlab. Youll need to add the new image as an option to each of the profiles.

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

3 participants