Singularity: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 30: Line 30:


<!--T:6-->
<!--T:6-->
Singularity is available on the Alliance clusters.
Singularity is available on our clusters.


<!--T:7-->
<!--T:7-->
Line 98: Line 98:
<source>$ SINGULARITY_TMPDIR="disk/location" singularity build IMAGE_NAME.sif docker://DOCKER-IMAGE-NAME</source>
<source>$ SINGULARITY_TMPDIR="disk/location" singularity build IMAGE_NAME.sif docker://DOCKER-IMAGE-NAME</source>


===Creating images on Alliance clusters=== <!--T:114-->
===Creating images on our clusters=== <!--T:114-->


<!--T:115-->
<!--T:115-->
Line 159: Line 159:


<!--T:133-->
<!--T:133-->
One can also use a '''Dockerfile''' to create Singularity images, but this is a two step process.
One can also use a <b>Dockerfile</b> to create Singularity images, but this is a two step process.
* The first step is to create a Docker image with the Dockerfile. This step should be executed on your VM or Linux machine, where you have sudo access. Go to the directory which contains the Dockerfile and run the command <code>sudo docker build -t CC:latest .</code>. By passing '.' as a parameter we are asking Docker to search for the Dockerfile in the current directory. This command will create a Docker image with the name '''CC''' and assign the image a tag with the value '''latest'''. Remember that latest is the default tag that Docker assigns to an image, so if you don't provide a tag, the image will use the default tag value '''latest'''.  
* The first step is to create a Docker image with the Dockerfile. This step should be executed on your VM or Linux machine, where you have sudo access. Go to the directory which contains the Dockerfile and run the command <code>sudo docker build -t CC:latest .</code>. By passing '.' as a parameter we are asking Docker to search for the Dockerfile in the current directory. This command will create a Docker image with the name <b>CC</b> and assign the image a tag with the value </b>latest</b>. Remember that latest is the default tag that Docker assigns to an image, so if you don't provide a tag, the image will use the default tag value <b>latest</b>.  
* The second step is to use the Docker image created above as the source for Singularity. The following command will create a Singularity image '''cc_image_latest.sif''' from the Docker image '''CC:latest''',
* The second step is to use the Docker image created above as the source for Singularity. The following command will create a Singularity image <b>cc_image_latest.sif</b> from the Docker image <b>CC:latest</b>,
<source>sudo singularity build cc_image_latest.sif docker-daemon://CC:latest</source>
<source>sudo singularity build cc_image_latest.sif docker-daemon://CC:latest</source>
You don't need to provide a path to the Docker image as the Docker daemon will automatically pick the image specified though the Docker registry, but we have to ensure that we use the correct image name and tag value.
You don't need to provide a path to the Docker image as the Docker daemon will automatically pick the image specified though the Docker registry, but we have to ensure that we use the correct image name and tag value.
rsnt_translations
56,430

edits

Navigation menu