Singularity Google Compute Builder

The Google Compute Builder is the first builder offered by the sregistry client! Using your Google Cloud project you can deploy builds to Google Compute Engine and then have images saved in Google Storage. This in essence is a mini “Singularity Hub” that you have complete control over. For the command line usage, continue reading the Getting Started below!

Quick Start

For the quickstart you need:

If you want to set the Google Compute builder as your current active client:

$ sregistry backend activate google-compute
[activate] google-compute
$ sregistry backend status
[backend status]
There are 9 clients found in secrets.
active: google-compute

The following sections demonstrate the most common usage for the build commands! We also provide a static demo of the current builder interface.

# Export credentials
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/google-secrets.json
export GOOGLE_CLOUD_PROJECT=vanessasur-us
export SREGISTRY_CLIENT=google-compute
# Install
$ pip install sregistry[google-compute]
# View Templates
$ sregistry build templates
# Save a template to customize
$ sregistry build templates /cloud/google/compute/ubuntu/securebuild-2.4.3.json > config.json
# Build with a repo with Singularity recipe in root
$ sregistry build 
# Preview a Configuration for the same (don't launch builder)
$ sregistry build --preview
# List instances
$ sregistry build instances

# List containers in storage
$ sregistry search
# Get detailed metadata for remote
$ sregistry search vsoch/hello-world:latest@3bac21df631874e3cbb3f0cf6fc9af1898f4cc3d
# Pull a container
$ sregistry pull vsoch/hello-world:latest@3bac21df631874e3cbb3f0cf6fc9af1898f4cc3d
# Look at images from compute locally
$ sregistry images | grep google-compute
# Look at metadata for local
$ sregistry inspect vsoch/hello-world:latest@3bac21df631874e3cbb3f0cf6fc9af1898f4cc3d
# Look at latest log
$ sregistry build logs
# Look at specific logs
$ sregistry build logs vsoch/hello-world:latest@3bac21df631874e3cbb3f0cf6fc9af1898f4cc3d
# Run it!
$ singularity run $(sregistry get vsoch/hello-world:latest@3bac21df631874e3cbb3f0cf6fc9af1898f4cc3d)
RaawwWWWWWRRRR!! Avocado!

There is more to learn!