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

Add info how to persist user data #1977

Merged
merged 4 commits into from
Aug 20, 2023

Conversation

mathbunnyru
Copy link
Member

Describe your changes

Issue ticket if applicable

Fix: #1959

Checklist (especially for first-time contributors)

  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests
  • I will try not to use force-push to make the review process easier for reviewers
  • I have updated the documentation for significant changes

@mathbunnyru
Copy link
Member Author

@laundmo @bjornjorgensen please, take a look here.

@@ -24,7 +24,7 @@ and want to launch a single Jupyter Application in a container.

The [User Guide on ReadTheDocs](https://jupyter-docker-stacks.readthedocs.io/en/latest/) describes additional uses and features in detail.

**Example 1:**
### Example 1
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it possible to address it in other parts of docs.

@laundmo
Copy link

laundmo commented Aug 20, 2023

It's good to have this documented, but it doesnt address the core issue of how to persist packages installed by a user. it only documents how to persist packages installed by the admin of the container host.

@mathbunnyru
Copy link
Member Author

but it doesnt address the core issue of how to persist packages installed by a user

Could you please explain, what you mean by this?
Which packages and installed how exactly?

@laundmo
Copy link

laundmo commented Aug 20, 2023

a user of jupyter lab, who only sees the webinterface, may run !pip install package to install a package. These wont be persisted with the methods documented here.

@mathbunnyru
Copy link
Member Author

Ok, I added a note that a package installed inside a running container will not be preserved.
Please, take a look.

@laundmo
Copy link

laundmo commented Aug 20, 2023

the core issue is that users cant interact with the docker image - by design, and because my users dont have the knowhow. knowing that it wont be persisted is good, but it shouldnt close #1959

@mathbunnyru
Copy link
Member Author

the core issue is that users cant interact with the docker image - by design

Why can't they? They can, but as it always works with docker images, some changes are lost after a container exists, and this is indeed by design.

and because my users dont have the knowhow.

That's why we're adding these docs.

knowing that it wont be persisted is good, but it shouldnt close #1959

Could you make a suggestion what to add here?
You told this is a documentation issue and I believe I added all the neccessary information to the docs.

@laundmo
Copy link

laundmo commented Aug 20, 2023

Why can't they? They can, but as it always works with docker images

sorry, this was unclear: they cant access the docker host or start/stop/rebuild images.

You told this is a documentation issue

initially i thought it was. maybe its actually a feature request.

@mathbunnyru
Copy link
Member Author

mathbunnyru commented Aug 20, 2023

Why can't they? They can, but as it always works with docker images

sorry, this was unclear: they cant access the docker host or start/stop/rebuild images.

You told this is a documentation issue

initially i thought it was. maybe its actually a feature request.

Ok, then please create a new issue with a feature request, which describes what you want users to be able to do (and then we will discuss if it's possible).
Also, if you want to have the whole state saved, you can use docker commit command (you need to have an access to the host machine obviously), but this is not the best practice: https://stackoverflow.com/a/44480870/4881441

For now, I'm merging this PR (and closing the issue) as I believe there is nothing more to document on this issue.

@mathbunnyru mathbunnyru merged commit 948f0bb into jupyter:main Aug 20, 2023
@benz0li
Copy link
Contributor

benz0li commented Aug 21, 2023

@laundmo You might be interested in my/b-data's JupyterLab docker stacks.

Those images

  1. allow to mount1 the whole user directory and thus preserve all user data.
  2. use Python (no Conda/Mamba) and install packages in the home directory.

Demo environment: https://demo.jupyter.b-data.ch

Cross references:

  1. Populate home dir if it is empty #1478 (comment)
  2. [ENH] - /home/jovyan/work is confusing (documentation) #1969

Footnotes

  1. Either volume or bind mount

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

Successfully merging this pull request may close these issues.

[ENH] - Document correct way to persist conda packages
3 participants