{"id":22599621,"url":"https://github.com/singularityhub/singularity-orb","last_synced_at":"2026-01-07T21:10:04.531Z","repository":{"id":46738115,"uuid":"173186949","full_name":"singularityhub/singularity-orb","owner":"singularityhub","description":"Circle CI orb for interacting with Singularity client","archived":false,"fork":false,"pushed_at":"2021-09-28T03:13:20.000Z","size":170,"stargazers_count":0,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T23:08:31.959Z","etag":null,"topics":["circleci","circleci-orb","circleci-orbs","orb","singularity"],"latest_commit_sha":null,"homepage":"https://circleci.com/orbs/registry/orb/singularity/singularity","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/singularityhub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-28T21:02:40.000Z","updated_at":"2021-09-28T03:13:21.000Z","dependencies_parsed_at":"2022-08-25T14:40:51.143Z","dependency_job_id":null,"html_url":"https://github.com/singularityhub/singularity-orb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singularityhub%2Fsingularity-orb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singularityhub%2Fsingularity-orb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singularityhub%2Fsingularity-orb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singularityhub%2Fsingularity-orb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/singularityhub","download_url":"https://codeload.github.com/singularityhub/singularity-orb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246093100,"owners_count":20722395,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["circleci","circleci-orb","circleci-orbs","orb","singularity"],"created_at":"2024-12-08T11:10:43.598Z","updated_at":"2026-01-07T21:10:04.495Z","avatar_url":"https://github.com/singularityhub.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Singularity Orb\n\nThis is the [Circle CI Orb](https://circleci.com/orbs/registry/) to help you \ninteract with [Singularity containers](https://github.com/sylabs/singularity).\nPlease see the [published orb](https://circleci.com/orbs/registry/orb/singularity/singularity)\nto get the latest version, or look into the\n[VERSION](VERSION) file here. The documentation will state 1.0.0 but we are beyond\nthat version.\n\n## Versions\n\n - 1.0.11: bump to Singularity 3.8.2, Go to 1.17.1, and machine\n - 1.0.10: go-version default should be string\n - 1.0.9: updates to support Singularity 3.5, default install to 3.5.0\n - 1.0.8: no change in functionality, src/orb.yml cleaned up to reduce redundancy.\n - 1.0.7: a redo with cache, this time working to correctly change permissions.\n - 1.0.6: a re-release of 1.0.4, since CircleCI doesn't allow taking versions down unless there is a security reason.\n - 1.0.5: **do not use** cache added for Singularity (debian bases, not Docker) based on Singularity version, however while the Orb tested to work, in production it breaks Singularity to install to the user home. This version should not be used.\n - 1.0.4: bug above is fixed, and default Singularity for 3.x is 3.2.1.\n - 1.0.3: coincides with Singularity 3.1.0 and 2.6.1 as default. There is a bug with the singularity-version variable so it doesn't change from 3.1.0.\n\n\n## Development\n\nBefore this Orb was used / tested with CircleCI, I needed to [install](https://circleci.com/docs/2.0/creating-orbs/)\nthe CircleCI client, and then validate it locally:\n\n```bash\n$ circleci orb validate src/orb.yml\n```\n\nand also deployed a development alpha version\n\n\n```bash\n$ circleci orb publish src/orb.yml singularity/singularity@dev:alpha\n```\n\n## Examples\n\nThe examples below describe the `.circleci/config.yml` file in your repository!\nGenerally, the examples below will vary on:\n\n - The executor (either a machine or Docker base image)\n - The versions of software installed (e.g., Singularity or GoLang)\n \n@vsoch has tried to provide you with all the combinations that you might need to\nbuild and interact with containers. For example, building a container using a\npre-built Docker base is the fastest, but you couldn't interact with it.\nUsing a machine base (and installing GoLang and Singularity, maximally) would\ngive you more functionality, but the build steps would take longer (and caching is\nrecommended).\n\n### Build Examples\n\n#### Fast Build\n\nFor the fastest build, you can use a pre-built Docker container. Since the\ndependencies are inside the container, you can specify any version of Singularity.\nVersions 1.8 and below coincide with a Docker tag of [singularityware/singularity](https://hub.docker.com/r/singularityware/singularity/tags) on Docker Hub, while later versions use [singularity/singularity](https://quay.io/repository/singularity/singularity) on Quay.io.\n\n```yaml\nversion: 2.1\n\norbs:\n  singularity: singularity/singularity@1.0.0\n\nworkflows:\n  build_container_docker_base_example:\n    jobs:\n      - singularity/build_container_docker_base:\n          from-uri: docker://busybox\n          image: busybox.sif\n```\n\n\n\n#### Debian Base with Custom (Singularity 2) Version\n\nIt's more likely that you'd want a machine (debian) base with Singularity if you\nwant to otherwise interact with your container. Here we install Singularity\nfrom source.\n\n```yaml\nversion: 2.1\n\norbs:\n  singularity: singularity/singularity@1.0.0\n\nworkflows:\n  build_container_custom_2_example:\n    jobs:\n      - singularity/build_container_custom_2:\n          singularity-version: 2.6.1\n          from-uri: docker://busybox\n          image: busybox.sif\n```\n\n\n#### Debian Base with Custom (Singularity 3) Version\n\nAnd the same for the Singularity 3.* family. Notice you also have the\nchoice to define the version of GoLang, since we need to install it (the\ndefault is 11.1.5). This option will give you the most freedom to use the \ncontainer after building.\n\n\n```yaml\nversion: 2.1\n\norbs:\n  singularity: singularity/singularity@1.0.0\n\nworkflows:\n  build_container_custom_3_example:\n  jobs:\n    - singularity/build_container_custom_3:\n        go-version: \"1.13\"\n        singularity-version: 3.5.0\n        from-uri: docker://busybox\n        image: busybox.sif\n```\n\n### Debian base with control of machine\n\nThe below workflow shows controlling the machine executor.\n\n```yaml\n  install_debian_3_manual:\n    description: |\n      Install Singularity 3.* on a debian base, with control over the executor. \n\n    usage:\n      version: 2.1\n\n      orbs:\n        singularity: singularity/singularity@1.0.0\n\n      executors:\n        ubuntu-machine:\n          machine:\n            image: ubuntu-2004:202107-02\n\n      workflows:\n        install_debian_3_example:\n          jobs:\n            - install_debian_3_example_manual:\n\n      jobs:\n        install_debian_3_example_manual:\n        executor: \"ubuntu-machine\"\n        working_directory: ~/repo\n        steps:\n          - checkout\n          - singularity/install-go\n          - singularity/debian-install-3:\n              singularity-version: 3.8.3\n              go-version: \"1.17.1\"\n```\n\n#### Docker Base with Custom (Singularity 3) Version\n\nYou can also install a custom version of Singularity into an alpine base image\nthat already has GoLang installed.\n\n```yaml\nversion: 2.1\n\norbs:\n  singularity: singularity/singularity@1.0.0\n\nworkflows:\n  build_container_docker_custom_3_example:\n  jobs:\n    - singularity/build_container_docker_custom_3:\n        singularity-version: 3.5.0\n        go-version: \"1.13\"\n        from-uri: docker://busybox\n        image: busybox.sif\n```\n\n\n### Install\n\n#### Install Debian, Singularity 2.*\n\nThis is more likely to be useful to you if you want to otherwise interact\nwith your container, beyond build. Here is how to build a 2.* derivative of\nSingularity. We aren't using Docker.\n\n```yaml\nversion: 2.1\n\norbs:\n  singularity: singularity/singularity@1.0.0\n\nworkflows:\n  install_debian_2_example:\n    jobs:\n      - singularity/install_debian_2:\n        singularity-version: 2.6.1\n```\n\n#### Install Debian, Singularity 3.*\n\nLet's say that you want the same, but you want to install a specific\nversion of Singularity (over 3.0). Here we can use an alpine Docker base\n(comes with GoLang) to add Singularity on top of it. \n\n```yaml\nversion: 2.1\n\norbs:\n  singularity: singularity/singularity@1.0.0\n\nworkflows:\n  install_debian_3_example:\n    jobs:\n      - singularity/install_debian_3:\n        go-version: \"1.13\"\n        singularity-version: 3.5.0\n```\n\n#### Install Docker, Singularity 3.*\n\nYou can also customize the version of Singularity installed in an alpine\nDocker base.\n\n```yaml\nversion: 2.1\n\norbs:\n  singularity: singularity/singularity@1.0.0\n\n  workflows:\n    install_alpine_docker_3_example:\n      jobs:\n        - singularity/install_alpine_docker_3:\n            singularity-version: 3.5.0\n```\n\n\n### Other\n\n#### Interaction with Singularity via Docker Client\n\nTo just get the Docker base image with Singularity (no build) you can do that:\n\n```yaml\nversion: 2.1\n\norbs:\n  singularity: singularity/singularity@1.0.0\n\n  workflows:\n    docker_cli_example:\n      jobs:\n        - singularity/docker_cli:\n            singularity-version: v3.5.0-slim\n```\n\nI don't have any good examples of using the above yet, please contribute yours if you do!\nA repository with a starter example is available at \n[singularityhub/singularity-orb-example](https://github.com/singularityhub/singularity-orb-example).\n\n\n### In the Wild\n\nHere are some examples of Orbs in the wild.\n\n - [Singularity Python Client](https://github.com/singularityhub/singularity-cli/blob/master/.circleci/config.yml): uses Orb commands to install different versions of Singularity.\n\n### What if I need help?\n\nPlease [open an issue](https://www.github.com/singularityhub/singularity-orb)!\n@vsoch is relatively new to Orbs, and will help you to write a configuration,\nor if a functionality is missing, write a new singularity orb. Right now\nwe just have build because that's the most common continuous integration need.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingularityhub%2Fsingularity-orb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsingularityhub%2Fsingularity-orb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingularityhub%2Fsingularity-orb/lists"}