Python miniconda on Hexagon

From HPC documentation portal

A short instruction on how to use Miniconda3 on Hexagon.

  • Comment out all PYTHONPATH in .bashrc which is pointing to any self compiled Python modules, which can be incompatible with conda
  • module load python/miniconda3-4.4.10
  • Add ~/.condarc with the following:
envs_dirs:
- /work/users/username/conda-envs
channels:
- defaults
show_channel_urls: yes 
  • Adjust /work/users/username/conda-envs to point to the directory you want (should be either on /work or /shared).
  • Create and install virtual environment, eg conda create -n testenv numpy scipy matplotlib
  • Use source activate testenv to use your environment

Short example on how to use your created environment from the job:

cd MY_WORKING_DIRECTORY
module load python/miniconda3-4.4.10
source activate testenv

aprun -n1 python .....