From b7a332af3fd4f034e28460d25df778a32c34d149 Mon Sep 17 00:00:00 2001 From: tbmorgan <1275913+tbmorgan@users.noreply.github.com> Date: Thu, 12 Dec 2024 17:43:53 -0600 Subject: [PATCH] Updated Conda guide to reflect that Conda must be run on a compute node. --- sn_collections/_guides/software/conda.md | 87 +++++++++++++----------- 1 file changed, 47 insertions(+), 40 deletions(-) diff --git a/sn_collections/_guides/software/conda.md b/sn_collections/_guides/software/conda.md index 488e707b4..240b9fce4 100644 --- a/sn_collections/_guides/software/conda.md +++ b/sn_collections/_guides/software/conda.md @@ -35,7 +35,7 @@ subnav: Many open-source scientific software packages are available: -* [Browse/search](https://anaconda.org/search) all conda packages +* [Browse/search](https://conda-forge.org/packages/) all conda packages The [Bioconda](http://bioconda.github.io/) channel contains thousands of software packages that are useful for bioinformatics. * [Browse/search](https://bioconda.github.io/conda-package_index.html) available Bioconda software packages @@ -46,27 +46,32 @@ The **miniconda** module also provides [mamba](https://mamba.readthedocs.io/en/l ## Setup +Conda must be run on a compute node. Attempting to run Conda on the login node will result in an "Operation not permitted" error. If you are not already on a compute node, you may request an interactive allocation with: +``` +[user.name@ceres ~]$ salloc +``` + Before using conda or conda-installed software on Ceres, the *miniconda* environment module (which contains the conda software environment) must be loaded. To load the latest miniconda module available on Ceres: ``` -[user.name@ceres ~]$ module load miniconda +[user.name@ceres19-compute-0 ~]$ module load miniconda ``` You can see all available versions of miniconda on Ceres with: ``` -[user.name@ceres ~]$ module spider miniconda +[user.name@ceres19-compute-0 ~]$ module spider miniconda ``` *(Optional one-time setup for bioconda users)* If you plan on installing software primarily from the bioconda channel, before using conda for the first time on Ceres, you may wish to configure conda [per the bioconda documentation](http://bioconda.github.io/user/install.html#set-up-channels) to search for software packages in the conda-forge, bioconda, and defaults channels (in that order): ``` -[user.name@ceres ~]$ conda config --add channels defaults -[user.name@ceres ~]$ conda config --add channels bioconda -[user.name@ceres ~]$ conda config --add channels conda-forge +[user.name@ceres19-compute-0 ~]$ conda config --add channels defaults +[user.name@ceres19-compute-0 ~]$ conda config --add channels bioconda +[user.name@ceres19-compute-0 ~]$ conda config --add channels conda-forge ``` Otherwise, the conda-forge and then bioconda channels must be specified every time software is installed via `conda install` or `conda create`: ``` -conda install -c conda-forge -c bioconda SOFTWARE_PACKAGE1 SOFTWARE_PACKAGE2... +[user.name@ceres19-compute-0 ~]$ conda install -c conda-forge -c bioconda SOFTWARE_PACKAGE1 SOFTWARE_PACKAGE2... ``` @@ -87,30 +92,31 @@ On Ceres, suitable locations for conda environments housing conda packages inclu ### Best Practices -* **Use an interactive session on a compute node to install software with conda to avoid slowing down the login node for everyone, e.g,** +* **You must use a compute node to run Conda, e.g,** ``` [user.name@ceres ~]$ salloc - [user.name@ceres14-compute-60 ~]$ module load miniconda - [user.name@ceres14-compute-60 ~]$ source activate my_env - (my_env) [user.name@ceres14-compute-60 ~]$ conda install + [user.name@ceres19-compute-0 ~]$ module load miniconda + [user.name@ceres19-compute-0 ~]$ source activate my_env + (my_env) [user.name@ceres19-compute-0 ~]$ conda install ... ``` ### Example 1: Installing Trinity into a home directory -Load the latest miniconda module if you haven't already and create an environment called "trinityenv": +Get a compute node allocation and load the latest miniconda module if you haven't already. Then create an environment called "trinityenv": ``` -[user.name@ceres ~]$ module load miniconda -[user.name@ceres ~]$ conda create --name trinityenv +[user.name@ceres ~]$ salloc +[user.name@ceres19-compute-0 ~]$ module load miniconda +[user.name@ceres19-compute-0 ~]$ conda create --name trinityenv ``` Note that the `conda create` command used above without the --prefix option will create the environment in your home directory ($HOME/.conda/envs/). To activate the environment (and update environment variables such as PATH that are required to use software installed into this environment): ``` -[user.name@ceres ~]$ source activate trinityenv -(trinityenv) [user.name@ceres ~]$ +[user.name@ceres19-compute-0 ~]$ source activate trinityenv +(trinityenv) [user.name@ceres19-compute-0 ~]$ ```