

Build a Singularity image from the definition file.See Example 2 in the article Building an Image Using the Singularity Build Tool for a sample definition file. Using the Dockerfile as a guide, create a Singularity definition file.Use this method if you do not have a ready-to-use Docker image but you have a working Dockerfile (a text file containing all commands needed to build an image), providing that none of the steps in the recipe require root privilege. Pfe$ singularity build -sandbox lolcow docker://godlovedc/lolcow Method 3: Using a Working Dockerfile Without a Docker Image Pfe% singularity pull lolcow.sif docker://godlovedc/lolcow On a Pleiades front-end system (PFE), do the following to create a singularity image or a singularity sandbox: pfe$ module load singularity Note: You need an account to upload to the Docker hub. For example, the image godlovedc/lolcow exists in the Docker hub. Use this method if your ready-to-use Docker image has been uploaded to the Docker hub. Method 2: Using an Existing Docker Image on Docker Hub Pfe$ singularity exec lolcow cowsay hello Note: In this example, lolcow is the directory name of the Singularity image. If the tarball is not in the current working directory, specify the path, for example, /tmp: pfe$ singularity build -sandbox lolcow docker-archive:///tmp/lolcow.tar Pfe$ singularity build -sandbox lolcow docker-archive://lolcow.tar If the tarball is in your current working directory on Pleiades, do:

On a Pleiades front-end system (PFE), load the singularity modulefile prior to running any Singularity commands: pfe$ module load singularity Convert the tarball to a Singularity image.For example: your_local_system$ scp lolcow.tar pfe: Use scp or sup shiftc (see the article Using Shift for Remote Transfers and Tar Operations) to copy to Pleiades. Godlovedc/lolcow latest 577c1fe8e6d8 2 years ago 241MBįor the Docker image you want to port to Pleiades, for example, godlovedc/lolcow with an image ID of 577c1fe8e6d8, create a tarball using the docker save command: your_local_system$ docker save 577c1fe8e6d8 -o lolcow.tar Hello-world latest bf756fb1ae65 5 months ago 13.3kB On the host where you run Docker, use the command docker images to find the image IDs of Docker images stored in your local registry (usually /var/lib/docker). Method 1: Using an Existing Docker Image on Your Local Machine A docker.Image resource represents a Docker image built locally which is published and made available via a remote Docker registry. Note: These methods use the module load singularity command, which will load the latest installed version of Singularity. For more information, see Accessing Singularity on Pleiades. If you run Docker containers elsewhere, use one of the methods described below to convert them to Singularity containers for use on Pleiades. For security reasons, Docker containers are not supported on Pleiades.
