A repository displaying a possible code structure suitable for Slurm
- Option 1:
module load {python_version}
- Option 2: Install any version of python using spack as a module then load it. Example: Install spack cf. https://spack.readthedocs.io/en/latest/getting_started.html .
Choose the version of python to install
srun -p build -t 01:00:00 --gres gpu:1 --pty spack install [email protected]
Create the module:
module use <spack_install_dir>/share/spack/modules/linux-rhel8-skylake_avx512/
Load the module (check the right name using spider)
- If not already install
sudo apt install sshfs
- Create a mount point in your home directory
mkdir my_mount_point
- Mount your share
sshfs {username}@izar.epfl.ch:/work/vita my_mount_point -o reconnect
Install Poetry
curl -sSL https://install.python-poetry.org | python3 -
Initialise it once in your repository
poetry init
Change the python version in use
poetry env use 3.8
Add requirements
poetry add {name_of_package}
Activate the virtual environment
poetry shell
Install requirements if needed
poetry install
To fix this reported bug, add the following to your .bashrc / .zhsrc
export PYTHON_KEYRING_BACKEND="keyring.backends.null.Keyring"
poetry add hydra-core
pip install hydra-core --upgrade
poetry add submitit