Insufficient disk space for Anaconda3
By default, Anaconda stores all environments in the home directory, which is /pfss/home/<userid>. However, this file set is small (10GB). It is not intended to store software. We recommend using our Scratch file set (100GB) to keep your conda env. Following is the step about how to set it up.
All we need to do is create a config file for conda. Edit ~/.condarc as follows with your favorite editor.
# please replace USERID with your user id
pkgs_dirs:
- /pfss/scratch01/USERID/.conda/pkgs
envs_dirs:
- /pfss/scratch01/USERID/.conda/envs
channel_priority: flexible
Now, all Python packages will be stored in your scratch folder. You may verify it as follows:
# load conda from Lmod
$ module load Anaconda3
# show the current directory for envs
$ conda config --show envs_dirs
envs_dirs:
- /pfss/scratch01/appcara.test/.conda/envs
- /pfss/home/appcara.test/.conda/envs
- /pfss/lmod/software/Anaconda3/2022.05/envs
# show the current directory for python packages
$ conda config --show pkgs_dirs
pkgs_dirs:
- /pfss/scratch01/appcara.test/.conda/pkgs
# create a new conda env
$ conda create -n myenv python=3.12
# review path of the newly created env
$ conda env list
myenv /pfss/scratch01/appcara.test/.conda/envs/myenv
# activate it in the current shell session
$ source activate myenv
# verify the right python version is installed
(myenv) $ python --version
Python 3.12.1