Difference between revisions of "Submit a Singularity job"
From ScientificComputing
(Created page with "__NOTOC__ $ singularity pull docker://dockeruser/ubuntu-python3 $ ls ubuntu-python3_latest.sif $ singularity run ubuntu-python3_latest.sif python3 -c "import tensorflow...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
+ | {{back_to_tutorials}} | ||
+ | == Download the container image == | ||
+ | Please see [[Deploy a container using Singularity]] for how to create the example container image ubuntu-python3 | ||
$ singularity pull docker://dockeruser/ubuntu-python3 | $ singularity pull docker://dockeruser/ubuntu-python3 | ||
$ ls | $ ls | ||
ubuntu-python3_latest.sif | ubuntu-python3_latest.sif | ||
+ | |||
+ | == Create a job script == | ||
+ | Create a file called ''job_script.bsub'' and add | ||
+ | #!/usr/bin/bash | ||
+ | #BSUB -n 1 | ||
+ | #BSUB -R singularity | ||
+ | #BSUB -R "rusage[mem=2048]" | ||
+ | #BSUB -W 1:00 | ||
− | + | singularity run ubuntu-python3_latest.sif python3 -c "import tensorflow as tf; print(tf.__version__)" | |
− | + | ||
− | + | Submit the job script | |
− | 2.5.0 | + | $ bsub < job_script.bsub |
+ | |||
+ | When the job has finished, you can see the output in the output file lsf.o* | ||
+ | 2.5.0 | ||
+ | |||
+ | {{back_to_tutorials}} |
Latest revision as of 07:49, 12 October 2021
< Examples |
Download the container image
Please see Deploy a container using Singularity for how to create the example container image ubuntu-python3
$ singularity pull docker://dockeruser/ubuntu-python3 $ ls ubuntu-python3_latest.sif
Create a job script
Create a file called job_script.bsub and add
#!/usr/bin/bash #BSUB -n 1 #BSUB -R singularity #BSUB -R "rusage[mem=2048]" #BSUB -W 1:00 singularity run ubuntu-python3_latest.sif python3 -c "import tensorflow as tf; print(tf.__version__)"
Submit the job script
$ bsub < job_script.bsub
When the job has finished, you can see the output in the output file lsf.o*
2.5.0
< Examples |