Part 2
-
Use
ls /ceph/container/pytorchcommand to find an appropriate PyTorch container. Copy the path to the container. -
Edit
run.shwith 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.pytoSCRIPT=
- Set
-
Save and exit the file.
-
Start
run.shusingsbatchcommand -
Use
watch -n 1 squeue --meto check your job process (approx. 3 minutes to processs) -
When the job done, press
CTRL+Cto exitwatch-mode and check the content ofresult_x.outusingcatcommand. Thexis the job id.
Solution
- Use
ls /ceph/containerto locate a PyTorch container image in the/ceph/containerdirectory. 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.shto 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.pytoSCRIPT=
- Set
- Press
CTRL+Ofollowed byENTERto save the file, then pressCTRL+Xto exit the file. - Use
sbatch run.shto start the job. - Use
watch -n 1 squeue --meto check your job process - When the job done, press
CTRL+Cto exitwatch-mode and check the content ofresult_x.outusingcatcommand