Part two
-
Use
ls /ceph/container/pytorch
command to find an appropriate PyTorch container. Copy the path to the container. -
Edit
run.sh
with nano (Nano guide) or vim (Vim guide) text editor. -
Set the following parameters in the script (Guide to run a bash script)
- Set
#SBATCH --cpus-per-task=
to 15 - Set
#SBATCH --mem=
to 24G - Set
#SBATCH --gres=gpu:1
- Add the container path you copied to
PATHTOCONTAINER=
- Add
name_generator.py
toSCRIPT=
- Set
-
Save and exit the file.
-
Start
run.sh
usingsbatch
command -
Use
watch -n 1 squeue --me
to check your job process (approx. 3 minutes to processs) -
When the job done, press
CTRL+C
to exitwatch
-mode and check the content ofresult_x.out
usingcat
command. Thex
is the job id.
Solution
- Use
ls /ceph/container
to locate a PyTorch container image in the/ceph/container
directory. Copy the path, e.g./ceph/container/pytorch/pytorch_24.07.sif
. - Make sure your current directory is
user@student.aau.dk@ailab-fe01:~/generating-names-with-pytorch$
.- If not, go into the directory by using
cd generating-names-with-pytorch
.
- If not, go into the directory by using
- Use
nano run.sh
to open the bash script with nano text editor- Set
#SBATCH --cpus-per-task=
to 15 - Set
#SBATCH --mem=
to 24G - Set
#SBATCH --gres=gpu:1
- Add the container path you copied to
PATHTOCONTAINER=
- Add
name_generator.py
toSCRIPT=
- Set
- Press
CTRL+O
followed byENTER
to save the file, then pressCTRL+X
to exit the file. - Use
sbatch run.sh
to start the job. - Use
watch -n 1 squeue --me
to check your job process - When the job done, press
CTRL+C
to exitwatch
-mode and check the content ofresult_x.out
usingcat
command