[[PageOutline]] = Build Singularity Containers from Recipes = Because you do not have administrative privileges, you cannot build a Singularity container from a Singularity recipe file on Cypress. == Build Remotely on the Cloud == * You can build a Singularity container from a recipe on [https://cloud.sylabs.io/builder Sylabs Cloud]. * On Cypress, use the provided '''singularity pull...''' command to construct the image file from the cloud such as the following, substituting your chosen values for '''sylabsID''', '''myCollection''', '''myImage''', and '''myTag'''. {{{ [tulaneID@cypress01-009 ~]$singularity pull --arch amd64 library://sylabsID/myCollection/myImage:myTag }}} === Signing Your Container File === * You may encounter the following messages, {{{ WARNING: integrity: signature not found for object group 1 WARNING: Skipping container verification }}} * If so, then you can sign your container file via the following. * Create or update your Sylabs token as needed at [https://cloud.sylabs.io/tokens Sylabs Cloud Tokens] * Copy the new Sylabs token provided in the above as needed in your clipboard. * Confirm your remote login in your interactive session by entering the command {{{ [tulaneID@cypress01-009 ~]$singularity remote login }}} * Paste the new Sylabs token provided as needed at the prompt. * Substitute your chosen values for '''sylabsID''', '''myCollection''', '''myImage''', and '''myTag''' in the URL !https://cloud.sylabs.io/library/sylabsID/myCollection/myImage * Observe on the Sylabs web page for the image the label '''Image is Unsigned'''. * Click on the button labeled '''Sign Image''', and at the terminal enter the commands in the resulting pop-up window, such as the following. {{{ [tulaneID@cypress01-009 ~]$singularity pull sylabsID_mycollection.sif library://sylabsID/mycollection/myimage:mytag [tulaneID@cypress01-009 ~]$singularity key list [tulaneID@cypress01-009 ~]$singularity sign --keyidx 0 sylabsID_mycollection.sif Signing image: cb4sylabs_mycollection.sif Signature created and applied to cb4sylabs_mycollection.sif [tulaneID@cypress01-009 ~]$singularity push sylabsID_mycollection.sif library://sylabsID/mycollection/myimage:mytag 3.6MiB / 3.6MiB [==============================================================================] 100 % 11.8 MiB/s 0s }}} * Confirm on the Sylabs web page for the image, refreshing the page as needed, the label '''Image is Signed'''. == Build on Your Local Machine == * You could build a Linux machine and install Singularity. * On Windows 11 or Windows 10 version 2004 and higher (Build 19041 and higher) * Install Windows Subsystem for Linux, version 2 ('''WSL 2'''). See [https://learn.microsoft.com/en-us/windows/wsl/install Install WSL]. * Install Singularity. See [https://sylabs.io/docs/ SingularityCE Documentation]. * As an alternative to SingularityCE, on your local machine (Linux or WSL 2) you could install Apptainer. * Apptainer will build '''.sif''' files compatible with Singularity. See [[https://apptainer.org/docs/user/latest/singularity_compatibility.html#sif-image-compatibility | SIF Image Compatibility]]. * See [[https://apptainer.org/documentation/ | Apptainer Documentation ]]. * Then upload the resulting '''.sif''' file to Cypress from your local machine using scp. (See [[cypress/FileTransfer#scpcommand | scp command]].)