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

Options for installing extra packages at runtime #31

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

JoshKarpel
Copy link
Contributor

Per #25 , a very common desire will be adding extra packages to the Python environment. We can let people do this without having to create their own Docker images (as we tell them to do right now) by adding some hooks to our entrypoint script.

This PR will implement these hooks:

  • conda_env, a full conda environment that the worker environment will be updated with.
  • conda_packages, a plain list of conda packages to install.
  • pip_packages, a plain list of pip packages to install.

We may, in the future, look into a hook for system packages, as mentioned in the discussion in #25.

@JoshKarpel JoshKarpel added the enhancement New feature or request label Jul 21, 2020
@JoshKarpel JoshKarpel self-assigned this Jul 21, 2020
@JoshKarpel JoshKarpel marked this pull request as draft July 21, 2020 19:42
@JoshKarpel JoshKarpel changed the title Options for install extra packages at runtime Options for installing extra packages at runtime Jul 21, 2020
@JoshKarpel
Copy link
Contributor Author

Ok, well, I tried my first version out and there's a big problem: we're going to get hosed by not running as root.

daskdev/dask depends on continuumio:miniconda3, which installs miniconda as root in /opt/miniconda. The permissions are

drwxr-xr-x 1 root root 4096 Jun 19 21:08 conda

which is great because it means that any user can run code, but means that no one but root can install any packages. HTCondor will never run a container as root, so we're in a bind. You would need to build a special image where the conda installation is world-writable to do more installs at runtime, which is precisely what we don't want users to have to do.

One possibility would be to produce our own versions of popular images, which are just one more layer with all of the permissions set appropriately, but that doesn't sound very sustainable.

Back to the drawing board, for the moment....

@JoshKarpel
Copy link
Contributor Author

Made some progress, but it involves unsetting conda's default package cache, which means it can't re-use already-installed packages. More things to play with...

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

Successfully merging this pull request may close these issues.

1 participant