...
Excerpt |
---|
Conda is a popular package manager. However, Conda creates many small files when installing packages, which can quickly fill your quota on /software. This article will tell you how to configure Conda to avoid this issue. Please note that these instructions also work for Mamba, which is a much faster drop-in replacement for Conda. |
When you install Conda, it is best practice to install in your software partition, i.e. $MYSOFTWARE
or `/software/projects/$PAWSEY_PROJECT/$USER/miniconda3`
Configuration
When Conda installs packages, it writes a lot of small files, which can quickly fill up your quota on /software. To avoid this issue, you can configure Conda via the .condarc file to put all those package files into the /scratch partition instead. There are two ways to update your .condarc file. The first way allows you to update your .condarc file from the command line. Ensure you edit the command below to match your project ID and user name:
Code Block |
---|
language | bash |
---|
theme | Emacs |
---|
title | Terminal 1. Installing miniconda |
---|
|
$ mkdir -p $MYSOFTWARE/miniconda3
$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $MYSOFTWARE/miniconda3/miniconda.sh
$ bash $MYSOFTWARE/miniconda3/miniconda.sh -b -u -p $MYSOFTWARE/miniconda3
$ rm -rf $MYSOFTWARE/miniconda3/miniconda.sh |
Configuration
When Conda installs packages, it writes a lot of small files, which can quickly fill up your quota on /software. To avoid this issue, you can configure Conda via the .condarc file to put all those package files into the /scratch partition instead. There are two ways to update your .condarc file. The first way allows you to update your .condarc file from the command line. Ensure you edit the command below to match your project ID and user name:
Column |
---|
|
Note - If you get a Disk Quota exceeded error, your home dir might be filled up so try cleaning by removing the dir and then creating it in the software and generating a symbolic link. Code Block |
---|
language | bash |
---|
theme | Emacs |
---|
title | Terminal 2. Conda configuration editing on command line |
---|
| $ conda config --add pkgs_dirs /scratch/pawsey0000/user_name/conda_cache |
|
...
Column |
---|
|
Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | Terminal 3. Example update of ~/.condarc file |
---|
| pkgs_dirs:
- /scratch/pawsey0000/user_name/conda_cache |
|
Conda supports users cleaning up old package files you no longer need. It’s important to do this regularly to avoid overburdening the Lustre filesystem on /scratch. To clean up, simply run:
...