This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
conda [2022/02/01 17:35] jpummil |
conda [2023/12/01 17:25] jpummil |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Conda ==== | + | ==== Conda Package Manager==== |
- | ==Conda== | + | ===Conda=== |
[[http:// | [[http:// | ||
Line 10: | Line 10: | ||
Rather than just dumping everything in one big pile and then trying to ascertain what you’ve installed, it makes much more sense to have groups of similar software together. One can (and should) also create a unique env for the more complex packages with lots of “moving parts” such as most assemblers. | Rather than just dumping everything in one big pile and then trying to ascertain what you’ve installed, it makes much more sense to have groups of similar software together. One can (and should) also create a unique env for the more complex packages with lots of “moving parts” such as most assemblers. | ||
+ | To get started... | ||
+ | < | ||
+ | |||
+ | $ module load python/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | Additionally, | ||
< | < | ||
+ | conda config --add channels defaults | ||
+ | conda config --add channels bioconda | ||
+ | conda config --add channels conda-forge | ||
+ | </ | ||
- | $ module load python/ | + | With everything above resolved, one can now search for relevant software that might be useful for their research... |
- | $ source / | + | (*The following two commands should be done on a compute node as login nodes no longer have reliable access to the outside world.) |
+ | < | ||
+ | conda search <package name> | ||
</ | </ | ||
+ | |||
+ | Once you find the package you wish to install, you would use the following example to perform the following task: | ||
+ | < | ||
+ | conda create -n < | ||
+ | </ | ||
+ | |||
+ | One may also use the following command to see what environments are already installed on Pinnacle and activate if suitable: | ||
+ | < | ||
+ | conda env list | ||
+ | </ | ||
+ | |||
+ | As most users will utilize their new software installs in conjunction with a SLURM job script, below is a quick example of how this process would be implemented: | ||
+ | |||
+ | < | ||
+ | #SBATCH -J < | ||
+ | #SBATCH --partition comp06 | ||
+ | #SBATCH -o < | ||
+ | #SBATCH -e < | ||
+ | #SBATCH --mail-type=ALL | ||
+ | #SBATCH --mail-user=< | ||
+ | #SBATCH --nodes=1 | ||
+ | #SBATCH --ntasks-per-node=32 | ||
+ | #SBATCH --time=06: | ||
+ | |||
+ | export OMP_NUM_THREADS=32 | ||
+ | |||
+ | module load python/ | ||
+ | conda activate < | ||
+ | </ | ||
+ | |||
+ | The Anaconda group maintain a very helpful "Cheat Sheet" for all things conda. If you have further questions, you can find it here: [[https:// | ||
+ | |||
So…just a few caveats/ | So…just a few caveats/ | ||
* If a “conda install xxx” asks you to downgrade or revert anything…STOP! Don’t do it. In this case, create a unique environment for that specific software tool alone. | * If a “conda install xxx” asks you to downgrade or revert anything…STOP! Don’t do it. In this case, create a unique environment for that specific software tool alone. | ||
- | * If it says “requires Python 2.7”….we’d also just create an isolated environment. | + | * If it says “requires Python 2.7”….we’d also just create an isolated environment |
- | * If “conda install xxx” shows just an enormous number of dependencies (Rstudio, BUSCO, and Qiime are prime examples)…best to Google before installing. These occasionally have “gotcha’s” that require a bit of additional effort. | + | * If “conda install xxx” shows just an enormous number of dependencies (Rstudio, BUSCO, GATK, and Qiime are prime examples)…best to Google before installing. These occasionally have “gotcha’s” that require a bit of additional effort. |
* Check developer page to see what the most current version of the software you need is…on occasion, the latest version on conda will be a couple of releases behind. | * Check developer page to see what the most current version of the software you need is…on occasion, the latest version on conda will be a couple of releases behind. | ||
* Though the situation improves daily, not ALL software packages are available thru conda repositories. | * Though the situation improves daily, not ALL software packages are available thru conda repositories. | ||
+ | * While conda does make GPU accelerated packages available, it isn't as straightforward getting those to run properly due to the necessity of activating the appropriate NVIDIA run time tools. | ||