Skip to content

A repository displaying a possible code structure suitable for Slurm

Notifications You must be signed in to change notification settings

vita-epfl/code_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A repository displaying a possible code structure suitable for Slurm

Scitas - Python versioning

  • Option 1:
module load {python_version}

Choose the version of python to install

srun -p build -t 01:00:00 --gres gpu:1 --pty spack install python@3.8.14

Create the module:

module use <spack_install_dir>/share/spack/modules/linux-rhel8-skylake_avx512/

Load the module (check the right name using spider)

Mount /work/vita on your workstation if needed

  1. If not already install
sudo apt install sshfs
  1. Create a mount point in your home directory
mkdir my_mount_point
  1. Mount your share
sshfs {username}@izar.epfl.ch:/work/vita my_mount_point -o reconnect

Poetry - Dependency Management

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

Poetry-Keyring Bug

To fix this reported bug, add the following to your .bashrc / .zhsrc

export PYTHON_KEYRING_BACKEND="keyring.backends.null.Keyring"

Hydra - Config File Management

poetry add hydra-core
pip install hydra-core --upgrade

Submitit - Slurm job Management

poetry add submitit

About

A repository displaying a possible code structure suitable for Slurm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages