You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
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
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 mynb_conda_kernels
-generated GATK kernel working in https://github.com/broadinstitute/gatk-workshop-terra-jupyter-image/blob/main/Dockerfile (which is derived fromterra-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 theusers
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 theusers
group, but there should be a more principled approach involving setting thesetgid
bit on the directory and changing the defaultumask
to allow group write permission (or perhaps by making use of theCONDA_PKGS_DIRS
environment variable).The text was updated successfully, but these errors were encountered: