- Install Virtualenvwrapper - this is my favorite way of creating virtualenvs
sudo apt-get install virtualenvwrapper
- Install on the compute as well, where
4
is the number of compute nodes:
srun -N 4 sudo apt-get install virtualenvwrapper
- Install your python packages in a shared directory, in this case
/fsx/ubuntu
:
cd /fsx/ubuntu
mkvirtualenv packages
pip3 install torch
- Create a job script
#!/bin/bash
#SBATCH -N 1
workon packages
...