Note that some of the links below might require you to have a password at SNIC
ssh berzelius.nsc.liu.se. You get asked for the password and then the 6-digit number from the authenticator account.interactive -n 1 go get your own CPU. Work from there. Use exit to leave the interactive session and free that CPU for others and to return to the login shell. From there, you can log off or request another interactive session. If you want to use conda:
conda env export > environment.yml to get a description of your conda envionment. Use scp or rsync to copy environment.yml to Berzelius.module load Anaconda/2021.05-nsc1 to load the conda module. It is a good idea to add this to your .bashrc.ln -s ~/.conda /proj/<your_project_dir>/users/$(id -un), don't forget to replace <your_project_dir> with your project id. In my case, it is “berzelius-2022-58”.conda env create -f environment.yml will replicate your home conda environment with the same name, etc. Then, run conda activate…  conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorchconda install -c conda-forge gym. Install Singularity by following this guide: https://sylabs.io/guides/3.0/user-guide/quick_start.html
Creating a simple Singularity image using a recipe file: https://sylabs.io/guides/3.0/user-guide/definition_files.html
vim Singularity.recipesudo singularity build image.sif Singularity.recipesingularity run image.sifsingularity exec image.sif python3 eval.pyUsing .sif file on Berzelius:
scp image.sif <username>@berzelius1.nsc.liu.se:/proj/<project name>/users/<username>/proj/<project name>/users/<username>singularity exec –nv image.sif python3 main.py