{"id":19206658,"url":"https://github.com/horothesun/singularity-conda-multiple-envs","last_synced_at":"2026-05-18T14:11:34.935Z","repository":{"id":111718095,"uuid":"346500675","full_name":"horothesun/singularity-conda-multiple-envs","owner":"horothesun","description":"Singularity containerization of a Conda-based multi-environment bash script.","archived":false,"fork":false,"pushed_at":"2021-04-17T13:33:33.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-23T06:44:06.503Z","etag":null,"topics":["conda","conda-env","conda-environment","containerization","github-actions","github-actions-ci","github-actions-ci-cd","multi-environment","singularity","singularity-cloud","singularity-container","singularity-containers","singularity-image","singularity-recipe"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/horothesun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-10T21:45:47.000Z","updated_at":"2021-04-17T13:33:35.000Z","dependencies_parsed_at":"2023-03-13T13:34:08.721Z","dependency_job_id":null,"html_url":"https://github.com/horothesun/singularity-conda-multiple-envs","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/horothesun/singularity-conda-multiple-envs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horothesun%2Fsingularity-conda-multiple-envs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horothesun%2Fsingularity-conda-multiple-envs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horothesun%2Fsingularity-conda-multiple-envs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horothesun%2Fsingularity-conda-multiple-envs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/horothesun","download_url":"https://codeload.github.com/horothesun/singularity-conda-multiple-envs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horothesun%2Fsingularity-conda-multiple-envs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33180453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["conda","conda-env","conda-environment","containerization","github-actions","github-actions-ci","github-actions-ci-cd","multi-environment","singularity","singularity-cloud","singularity-container","singularity-containers","singularity-image","singularity-recipe"],"created_at":"2024-11-09T13:16:34.189Z","updated_at":"2026-05-18T14:11:34.919Z","avatar_url":"https://github.com/horothesun.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Singularity image from Conda multi-environment script\n\n[![First env CI](https://github.com/horothesun/singularity-conda-multiple-envs/actions/workflows/first-env-ci-linux.yml/badge.svg)](https://github.com/horothesun/singularity-conda-multiple-envs/actions/workflows/first-env-ci-linux.yml)\n[![Second env CI](https://github.com/horothesun/singularity-conda-multiple-envs/actions/workflows/second-env-ci-linux.yml/badge.svg)](https://github.com/horothesun/singularity-conda-multiple-envs/actions/workflows/second-env-ci-linux.yml)\n[![Third env CI](https://github.com/horothesun/singularity-conda-multiple-envs/actions/workflows/third-env-ci-linux.yml/badge.svg)](https://github.com/horothesun/singularity-conda-multiple-envs/actions/workflows/third-env-ci-linux.yml)\n\n[![Image build and push](https://github.com/horothesun/singularity-conda-multiple-envs/actions/workflows/image-build-and-push-linux.yml/badge.svg)](https://github.com/horothesun/singularity-conda-multiple-envs/actions/workflows/image-build-and-push-linux.yml)\n\n[Singularity](https://singularity.lbl.gov/) containerization of a Conda-based multi-environment `bash` script.\n\n## Requirements\n\n- Conda ([install](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html)) for [manual execution](#manual-execution) and\n- Docker for [local Singularity image build](#local-singularity-image-build).\n\n## \u003ca name=\"manual-execution\"\u003e\u003c/a\u003e Manual execution\n\n```bash\n# environments creation\n./create_conda_envs.sh\n\n# run.sh in different environments\nconda activate first-env\n./run.sh\n\nconda activate second-env\n./run.sh\n\nconda activate third-env\n./run.sh\n```\n\n## \u003ca name=\"local-singularity-image-build\"\u003e\u003c/a\u003e Local Singularity image build\n\nRun `quay.io/singularity` Docker image and access its `bash` with\n\n```bash\ndocker run \\\n  --interactive --tty --rm --privileged \\\n  --volume $(pwd)/create_conda_envs.sh:/go/create_conda_envs.sh \\\n  --volume $(pwd)/environment-01.yml:/go/environment-01.yml \\\n  --volume $(pwd)/environment-02.yml:/go/environment-02.yml \\\n  --volume $(pwd)/environment-03.yml:/go/environment-03.yml \\\n  --volume $(pwd)/run.sh:/go/run.sh \\\n  --volume $(pwd)/runscript.sh:/go/runscript.sh \\\n  --volume $(pwd)/singularity-image.def:/go/singularity-image.def \\\n  --volume $(pwd)/out:/go/out \\\n  --entrypoint /bin/bash \\\n  quay.io/singularity/singularity:v3.7.2\n```\n\nthen, from within the container's `bash` run\n\n```bash\nexport IMAGE_FILENAME=/go/out/image.sif\n\n# build\nsingularity build $IMAGE_FILENAME singularity-image.def\n\n# inspect\nls -lah $IMAGE_FILENAME\nsingularity inspect $IMAGE_FILENAME\nsingularity inspect --deffile $IMAGE_FILENAME\n\n# run\nsingularity run $IMAGE_FILENAME\n```\n\n## Singularity image signing\n\nLogin into [Sylabs.io](https://cloud.sylabs.io/auth) and generate a Singularity Cloud token. Download the token file and save it to `~/.singularity/sylabs-token`.\n\nTo generate a new key to sign a Singularity image in a GitHub Action, run\n\n```bash\nsingularity keys newpair\n```\n\nand publish the public key on the Singularity Cloud.\n\nThen update the repository secrets as follows\n\n- `SINGULARITY_CLOUD_TOKEN`: run `\u003c ~/.singularity/sylabs-token | pbcopy` (on macOS) and paste the content of your clipboard as value of the secret,\n- `SINGULARITY_PGP_PASSPHRASE`: newly generated key's `passphrase` and\n- `SINGULARITY_PGP_SECRET_BASE64`: run `\u003c ~/.singularity/sypgp/pgp-secret | base64 | pbcopy` (on macOS) and paste the content of your clipboard as value of the secret.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhorothesun%2Fsingularity-conda-multiple-envs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhorothesun%2Fsingularity-conda-multiple-envs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhorothesun%2Fsingularity-conda-multiple-envs/lists"}