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

terra-jupyter-base should allow non-sudo/root use of conda #470

Open
droazen opened this issue Nov 3, 2023 · 0 comments
Open

terra-jupyter-base should allow non-sudo/root use of conda #470

droazen opened this issue Nov 3, 2023 · 0 comments

Comments

@droazen
Copy link

droazen commented Nov 3, 2023

terra-jupyter-base should allow the jupyter user to create conda environments in its home directory without having to sudo or run as root. As conda itself tells us, "In general, it's not advisable to use 'sudo conda'", and it can cause problems with libraries that default to storing configuration in the user home. Indeed, I was unable to get my nb_conda_kernels-generated GATK kernel working in https://github.com/broadinstitute/gatk-workshop-terra-jupyter-image/blob/main/Dockerfile (which is derived from terra-jupyter-base) until I switched to creating the conda environment as the jupyter user.

The main obstacle to enabling this functionality is the /opt/conda/pkgs/cache directory -- this directory needs to be writable by the jupyter user (or the users group), even if the jupyter user is just trying to create a conda environment in their own home directory. In https://github.com/broadinstitute/gatk-workshop-terra-jupyter-image/blob/main/Dockerfile I use a terrible hack to allow this directory to be written by the users group, but there should be a more principled approach involving setting the setgid bit on the directory and changing the default umask to allow group write permission (or perhaps by making use of the CONDA_PKGS_DIRS environment variable).

@droazen droazen changed the title terra-jupyter-base should allow non-root/sudo use of conda terra-jupyter-base should allow non-sudo/root use of conda Nov 3, 2023
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

1 participant