Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| documentation:ml:berzelius [2022-03-28 15:19] – [Working with Singularity] Robin Göransson | documentation:ml:berzelius [2022-09-02 16:04] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 54: | Line 54: | ||
| * Bootstrap: docker | * Bootstrap: docker | ||
| * From: ubuntu: | * From: ubuntu: | ||
| - | - Next, create | + | - Create |
| * %post | * %post | ||
| * apt -y update | * apt -y update | ||
| * apt -y install python3 | * apt -y install python3 | ||
| * apt -y install pip | * apt -y install pip | ||
| - | * pip3 install torch | + | |
| + | | ||
| + | - Add a %files section if any files are to be used by the singularity container: | ||
| + | * %files | ||
| + | * main.py / | ||
| + | * eval.py / | ||
| + | * logs/ / | ||
| + | - Specify in the %runscript section the standard script to be run: | ||
| + | * %runscript | ||
| + | * python3 main.py | ||
| + | - Create a .sif file from the recipe by running '' | ||
| + | - The script in the %runscript section can then be run with '' | ||
| + | - Other scripts can be run using '' | ||
| + | Using .sif file on Berzelius: | ||
| + | - Upload .sif file to Berzelius using '' | ||
| + | - Also upload all needed files to the same folder on Berzelius. | ||
| + | - Log into Berzelius, request computing resources and change directory to ''/ | ||
| + | - Run script using, for example '' | ||
| * under investigation... | * under investigation... | ||