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

Users need to be able to install custom persistent packages #146

Open
3 of 7 tasks
moorepants opened this issue Apr 14, 2020 · 4 comments
Open
3 of 7 tasks

Users need to be able to install custom persistent packages #146

moorepants opened this issue Apr 14, 2020 · 4 comments
Assignees

Comments

@moorepants
Copy link
Member

moorepants commented Apr 14, 2020

I don't think there is an open issue about this and I know we have these instructions https://github.com/LibreTexts/default-env#creating-your-own-custom-conda-environment, but I have not been able to get custom installations to work very well and definitely haven't gotten them to be persistent. So I'm not sure we have a workable solution. Here are some things that need to work:

  • conda install package should work for the root environment for non-persistent installs.
  • pip install package should generally work in the root environment too, it should use the root installed conda packages as a dependency base and drop this into the site-packages directory of the root conda install.
  • pip install --user package should work. This should let users install packages into their home directories that also use the root conda installed packages as a dependency base.
  • conda create -n my-env package should work and we should be able to open a notebook or console into that environment. A launcher icon should appear for this environment and if I click "new notebook" or "new console" the dropdown of optional kernels should show my custom environments.
  • The custom conda envs in the bullet above should be able to be persistent too, i.e. install your environments into your home directory. Ideally these environments should be hardlinking to any already installed packages in the root environment so that this doesn't eat up too much diskspace in the user's home directory. These will be softlinked, since the user's home directory will be on a different filesystem. It should still save disk space, though. -- rkevin
  • It would be nice if the user could install packages via apt, but I can see how that just may not be allowed because they could break the system in the docker file. Apt will definitely require root access, which we cannot give users. Most apt packages should be available from conda, and the user will have to build other packages from source themselves. --rkevin
  • We need to make sure that the install commands inside of R work too. Ideally they install R packages with conda, but I think the install.packages() command should work too.
@celine168
Copy link
Contributor

celine168 commented Apr 16, 2020

It would be nice if the user could install packages via apt, but I can see how that just may not be allowed because they could break the system in the docker file.

This would probably involve allowing sudo for users (if not, then we would have to use a different Linux OS instead of Ubuntu). There's a good comment/issue thread here about the topic: jupyterhub/zero-to-jupyterhub-k8s#1021 (comment)

As for the custom conda environments, I referenced this in another issue you opened.

@moorepants moorepants added the good first issue Good for newcomers label May 25, 2020
@rkevin-arch
Copy link
Member

For python packages, if you install using pip you can specify a --user option which doesn't require root and installs it into the user's home directory (so it's synced across their pods anyway). I'm 99% sure conda has that ability as well (a preliminary google search says you can use -p $HOME/local or something to install to your home directory, and then just change the $PATH so you can run binaries from it). For apt packages, that will be more of an issue, but for very specific use cases we can just ask people to build it from source. TODO: research how feasible this is

@rkevin-arch rkevin-arch self-assigned this Jun 22, 2020
@moorepants
Copy link
Member Author

Yes, we've tried these things over the last year, things that would work in local installs, but have had lots of trouble. The goal here would be to provide a best practice for users to add new software to our hub. We should have the conda installs working that install to their home directory at a minmum, and then we can provide recommendations for other package managers if needed. The key thing is communicating how they can actually install to HOME.

@moorepants
Copy link
Member Author

I recommend trying to setup some custom installs on a hub account to see what kinds of issues you hit.

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

No branches or pull requests

3 participants