-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[ENH] - Document correct way to persist conda packages #1959
Comments
I use a
|
@laundmo if you want to persist packages (mamba/conda/pip/apt), then you should create an inherited image and install them only once while building your Dockerfile. If you want to persist user files like python scripts, notebooks, text files and so on (created by you), then you should use a mount a volume. This volume might be just a folder on your host machine, or a docker volume (as in the example above). |
I don't think one way will work for everyone though. Persisting user files is more complicated.
The first three methods are common for all Docker ecosystem, the 4th one is documented in JupyterHub or JupyterHub's spawners, that's why we don't document it here. Hope this helps. |
I'm not asking how to do it. i know i can make a inherited image if there should be more packages from the get go, and i know you can mount in various ways. that's why this us a documentation issue, not "asking for help". i wasn't able to find any of these ways document anywhere. there isn't even a mention of the folder to mount ( i think there should be documentation at least pointing the way, specifically documentation which you can find by searching for things like "jupyter docker stacks persistent packages" or similar. |
I didn't immediately PR because I'm not sure whether there's specific details I'm not aware of which make advice like "mount /opt/conda" flawed |
@laundmo I will try to document how users can persist their data in a separate FAQ section in a few days.
I wouldn't recommend mounting
So, it's gonna work most of the time (especially, if you don't touch it), until you have to modify/update it. |
What docker image(s) is this feature applicable to?
base-notebook
What change(s) are you proposing?
Documenting a "blessed" way of persisting installed python packages, such that they are not removed after the container is recreated.
Ideally this should be a way which doesn't require persisting the packages automatically installed by the container
How does this affect the user?
As seen in
its not currently obvious how to correctly do this. Finding this issue is also not easy.
a documentation section for this would help users achieve this quickly without a lot of searching, and allow maintainers to choose one way of persisting python packages (entire conda env or just relevant folders? docker host mount or volume?)
Anything else?
No response
The text was updated successfully, but these errors were encountered: