biac:cluster:modules
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
biac:cluster:modules [2023/03/15 14:45] – cmp12 | biac:cluster:modules [2023/03/15 15:03] – [Setting Up and Maintaining Experiment Specific Conda Environments] cmp12 | ||
---|---|---|---|
Line 136: | Line 136: | ||
- | ====== Setting Up and Maintaining | + | ====== Setting Up Experiment Specific Conda Environments ====== |
+ | |||
+ | [[https:// | ||
+ | |||
+ | First, you want to unload the default python3 and load miniconda via modules to begin: | ||
+ | < | ||
+ | [cmp12@blade29 ~]$ module unload python3 | ||
+ | [cmp12@blade29 ~]$ module load miniconda | ||
+ | |||
+ | [cmp12@blade29 ~]$ conda --version | ||
+ | conda 22.11.1 | ||
+ | |||
+ | #set the default location to download packages to TMPDIR so you do not fill up your home directory | ||
+ | [cmp12@blade29 ~]$ export CONDA_PKGS_DIRS=${TMPDIR}/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | Now, create your environment in a mounted location. | ||
+ | |||
+ | < | ||
+ | conda create -p / | ||
+ | |||
+ | #activate it | ||
+ | conda activate / | ||
+ | |||
+ | #install some of the python modules you may need | ||
+ | (/ | ||
+ | / | ||
+ | |||
+ | (/ | ||
+ | |||
+ | #verify | ||
+ | (/ | ||
+ | / | ||
+ | |||
+ | |||
+ | (/ | ||
+ | ipython==8.11.0 | ||
+ | jedi==0.18.2 | ||
+ | matplotlib-inline==0.1.6 | ||
+ | nibabel==5.0.1 | ||
+ | numpy==1.24.2 | ||
+ | ....... | ||
+ | </ | ||
+ | |||
+ | Now you have a consistent environment that you can use/ | ||
+ | |||
+ | To deactivate just run "conda deactivate" | ||
+ | |||
+ | To make it consistent, you can modify your ~/ | ||
+ | |||
+ | < | ||
+ | module remove python3 | ||
+ | module add miniconda | ||
+ | |||
+ | conda activate / | ||
+ | </ | ||
+ | |||
+ | |||
+ | Alternatively, | ||
+ | |||
+ | < | ||
+ | | ||
+ | Python 3.10.4 (main, Mar 31 2022, 08:41:55) [GCC 7.5.0] on linux | ||
+ | Type " | ||
+ | >>> | ||
+ | >>> | ||
+ | ' | ||
+ | >>> | ||
+ | '// | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
biac/cluster/modules.txt · Last modified: 2024/06/21 15:44 by 127.0.0.1