I work on a HPC and there were a few items I had to add to get the image to work.
-
Problem: The apptainer cannot see my directory.
Solution: Added --bind / : /
-
Problem: Conda is not activated by default on HPC
Solution: Added right after --nv $APPTAINER_IMAGE
bash -c "
source /opt/conda/etc/profile.d/conda.sh # Initialize conda
conda activate base
python $SCRIPT \ ..."
I work on a HPC and there were a few items I had to add to get the image to work.
Problem: The apptainer cannot see my directory.
Solution: Added --bind / : /
Problem: Conda is not activated by default on HPC
Solution: Added right after --nv $APPTAINER_IMAGE
bash -c "
source /opt/conda/etc/profile.d/conda.sh # Initialize conda
conda activate base
python $SCRIPT \ ..."