From eb36a7a66ec52aa95b731a9554df1a572092ec81 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Thu, 3 Jul 2025 09:29:40 -0700 Subject: [PATCH 01/34] feat: push --- docker-wrappers/AllPairs/metadata.json | 3 + docker-wrappers/BowTieBuilder/metadata.json | 3 + docker-wrappers/Cytoscape/metadata.json | 3 + docker-wrappers/DOMINO/metadata.json | 3 + docker-wrappers/MEO/metadata.json | 3 + docker-wrappers/MinCostFlow/metadata.json | 3 + .../OmicsIntegrator1/metadata.json | 3 + .../OmicsIntegrator2/metadata.json | 3 + docker-wrappers/PathLinker/metadata.json | 3 + docker-wrappers/README.md | 20 ++++++ docker-wrappers/RWR/metadata.json | 3 + docker-wrappers/SPRAS/metadata.json | 3 + docker-wrappers/ST_RWR/README.md | 2 +- docker-wrappers/ST_RWR/metadata.json | 3 + docker-wrappers/push.py | 62 +++++++++++++++++++ 15 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 docker-wrappers/AllPairs/metadata.json create mode 100644 docker-wrappers/BowTieBuilder/metadata.json create mode 100644 docker-wrappers/Cytoscape/metadata.json create mode 100644 docker-wrappers/DOMINO/metadata.json create mode 100644 docker-wrappers/MEO/metadata.json create mode 100644 docker-wrappers/MinCostFlow/metadata.json create mode 100644 docker-wrappers/OmicsIntegrator1/metadata.json create mode 100644 docker-wrappers/OmicsIntegrator2/metadata.json create mode 100644 docker-wrappers/PathLinker/metadata.json create mode 100644 docker-wrappers/README.md create mode 100644 docker-wrappers/RWR/metadata.json create mode 100644 docker-wrappers/SPRAS/metadata.json create mode 100644 docker-wrappers/ST_RWR/metadata.json create mode 100644 docker-wrappers/push.py diff --git a/docker-wrappers/AllPairs/metadata.json b/docker-wrappers/AllPairs/metadata.json new file mode 100644 index 000000000..d08ca6a63 --- /dev/null +++ b/docker-wrappers/AllPairs/metadata.json @@ -0,0 +1,3 @@ +{ + "dockerName": "allpairs" +} diff --git a/docker-wrappers/BowTieBuilder/metadata.json b/docker-wrappers/BowTieBuilder/metadata.json new file mode 100644 index 000000000..c83457ced --- /dev/null +++ b/docker-wrappers/BowTieBuilder/metadata.json @@ -0,0 +1,3 @@ +{ + "dockerName": "bowtiebuilder" +} diff --git a/docker-wrappers/Cytoscape/metadata.json b/docker-wrappers/Cytoscape/metadata.json new file mode 100644 index 000000000..4fbd1d6d0 --- /dev/null +++ b/docker-wrappers/Cytoscape/metadata.json @@ -0,0 +1,3 @@ +{ + "dockerName": "py4cytoscape" +} diff --git a/docker-wrappers/DOMINO/metadata.json b/docker-wrappers/DOMINO/metadata.json new file mode 100644 index 000000000..46e5d94d5 --- /dev/null +++ b/docker-wrappers/DOMINO/metadata.json @@ -0,0 +1,3 @@ +{ + "dockerName": "domino" +} diff --git a/docker-wrappers/MEO/metadata.json b/docker-wrappers/MEO/metadata.json new file mode 100644 index 000000000..dfe1a0b1f --- /dev/null +++ b/docker-wrappers/MEO/metadata.json @@ -0,0 +1,3 @@ +{ + "dockerName": "meo" +} diff --git a/docker-wrappers/MinCostFlow/metadata.json b/docker-wrappers/MinCostFlow/metadata.json new file mode 100644 index 000000000..b27e8ec7d --- /dev/null +++ b/docker-wrappers/MinCostFlow/metadata.json @@ -0,0 +1,3 @@ +{ + "dockerName": "mincostflow" +} diff --git a/docker-wrappers/OmicsIntegrator1/metadata.json b/docker-wrappers/OmicsIntegrator1/metadata.json new file mode 100644 index 000000000..562504084 --- /dev/null +++ b/docker-wrappers/OmicsIntegrator1/metadata.json @@ -0,0 +1,3 @@ +{ + "dockerName": "omics-integrator-1" +} diff --git a/docker-wrappers/OmicsIntegrator2/metadata.json b/docker-wrappers/OmicsIntegrator2/metadata.json new file mode 100644 index 000000000..74b5833f0 --- /dev/null +++ b/docker-wrappers/OmicsIntegrator2/metadata.json @@ -0,0 +1,3 @@ +{ + "dockerName": "omics-integrator-2" +} diff --git a/docker-wrappers/PathLinker/metadata.json b/docker-wrappers/PathLinker/metadata.json new file mode 100644 index 000000000..708f7e9dd --- /dev/null +++ b/docker-wrappers/PathLinker/metadata.json @@ -0,0 +1,3 @@ +{ + "dockerName": "pathlinker" +} diff --git a/docker-wrappers/README.md b/docker-wrappers/README.md new file mode 100644 index 000000000..940e89d4e --- /dev/null +++ b/docker-wrappers/README.md @@ -0,0 +1,20 @@ +# docker-wrappers + +This folder contains the list of all docker wrappers. + +We build these docker images with `buildx` to support multiple docker architectures. + +For convenience, we provide a `push.py` python file which pushes a docker image with the architectures +that we want to support. + +``` +usage: push.py [-h] --tag TAG --dir DIR +push.py: error: the following arguments are required: --tag, --dir +``` + +For example, using the default supported `ghcr.io` registry that SPRAS uses, we can push RWR v1: + +``` +docker login ghcr.io -u reed-compbio +python push.py --dir RWR --version v1 +``` diff --git a/docker-wrappers/RWR/metadata.json b/docker-wrappers/RWR/metadata.json new file mode 100644 index 000000000..2609edae9 --- /dev/null +++ b/docker-wrappers/RWR/metadata.json @@ -0,0 +1,3 @@ +{ + "dockerName": "rwr" +} diff --git a/docker-wrappers/SPRAS/metadata.json b/docker-wrappers/SPRAS/metadata.json new file mode 100644 index 000000000..791992281 --- /dev/null +++ b/docker-wrappers/SPRAS/metadata.json @@ -0,0 +1,3 @@ +{ + "dockerName": "spras" +} diff --git a/docker-wrappers/ST_RWR/README.md b/docker-wrappers/ST_RWR/README.md index c13505f36..cc4213987 100644 --- a/docker-wrappers/ST_RWR/README.md +++ b/docker-wrappers/ST_RWR/README.md @@ -9,7 +9,7 @@ The random walk with restarts algorithm requires a directed input network. Howev To build a new docker image for ST_RWR navigate to the /docker-wrappers/ST_RWR directory and enter: ``` -docker build -t reedcompbio/str-wr -f Dockerfile . +docker build -t reedcompbio/st-rwr -f Dockerfile . ``` ## Testing diff --git a/docker-wrappers/ST_RWR/metadata.json b/docker-wrappers/ST_RWR/metadata.json new file mode 100644 index 000000000..30e05f94d --- /dev/null +++ b/docker-wrappers/ST_RWR/metadata.json @@ -0,0 +1,3 @@ +{ + "dockerName": "st-rwr" +} diff --git a/docker-wrappers/push.py b/docker-wrappers/push.py new file mode 100644 index 000000000..19653f3cb --- /dev/null +++ b/docker-wrappers/push.py @@ -0,0 +1,62 @@ +import argparse +import subprocess +import os +import json +from pathlib import Path + +COMMAND_BUILDX = ["docker", "buildx"] + +COMMAND_BUILDER_LS = COMMAND_BUILDX + ["ls"] +COMMAND_BUILDER_INSTANCE = COMMAND_BUILDX + ["create", "--name", "container", "--driver=docker-container"] + +# https://stackoverflow.com/a/5137509/7589775 +dir_path = os.path.dirname(os.path.realpath(__file__)) + +def construct_push_command(tag: str, dir: str): + base_cmd = ["build", "--tag", tag, "--file", Path(dir_path, dir, "Dockerfile"), "--platform", + "linux/arm64,linux/amd64", "--builder", "container", "--push", "."] + return COMMAND_BUILDX + base_cmd + +def parse_arguments(): + parser = argparse.ArgumentParser( + description="Docker Wrapper builder python wrapper" + ) + parser.add_argument("--dir", type=str, required=True, help="The directory of the docker wrapper to use") + parser.add_argument("--version", type=str, required=True, help="The version (tag name) to use for the container") + parser.add_argument("--org-name", type=str, help="The organization to push to", default="ghcr.io/reed-compbio/") + parser.add_argument("--yes", type=bool, help="Whether to automatically agree to pushing a container") + parser.add_argument("--relax", type=bool, help="Whether to not be strict on tag naming") + + return parser.parse_args() + +def main(): + # We need a buildx environment + # This is a terrible check. Yes, docker buildx has no API exposed on docker-py. + if not f"\ncontainer" in subprocess.check_output(COMMAND_BUILDER_LS).decode("utf-8"): + out = subprocess.run(COMMAND_BUILDER_INSTANCE) + if out.returncode != 0: + raise RuntimeError(f"Command {COMMAND_BUILDER_INSTANCE} exited with non-zero exit code.") + + args = parse_arguments() + + if not args.org_name.endswith("/"): + args.org_name = f"{args.org_name}/" + + if not args.version.startswith("v"): + if not args.relax: + raise ValueError("All versions start with v (v1, v2, ...)") + + metadata_path = Path(dir_path, args.dir, "metadata.json") + name = json.loads(metadata_path.read_text())['dockerName'] + tag = args.org_name + name + ":" + args.version + + push_command = construct_push_command(tag, args.dir) + + if not args.yes: + confirm = input(f"[y/n] Are you sure you want to push to {tag}? ") + if confirm.strip().lower() not in ('y', 'yes'): + raise RuntimeError("Did not confirm dialog.") + subprocess.run(push_command, capture_output=False) + +if __name__ == '__main__': + main() From bc9ba10eccfb1f96dda0acf6d64ae3f4977c199e Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Thu, 3 Jul 2025 09:39:36 -0700 Subject: [PATCH 02/34] ci: push docker --- .github/workflows/push-docker.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/push-docker.yml diff --git a/.github/workflows/push-docker.yml b/.github/workflows/push-docker.yml new file mode 100644 index 000000000..be41547f4 --- /dev/null +++ b/.github/workflows/push-docker.yml @@ -0,0 +1,27 @@ +name: Push to Docker + +on: + workflow_dispatch: + inputs: + folder: + description: 'The folder to push' + required: true + type: string + version: + description: 'The version to use (e.g. v1)' + required: true + type: string + +jobs: + push-image: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Run push.py + run: python3 docker-wrappers/push.py --dir ${{ inputs.folder }} --version ${{ inputs.version }} From d84be324423ef2fc3d257137d72fc132f08e970c Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Thu, 3 Jul 2025 09:45:32 -0700 Subject: [PATCH 03/34] ci(push-docker): specify yes-flag --- .github/workflows/push-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-docker.yml b/.github/workflows/push-docker.yml index be41547f4..0fb03397f 100644 --- a/.github/workflows/push-docker.yml +++ b/.github/workflows/push-docker.yml @@ -24,4 +24,4 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Run push.py - run: python3 docker-wrappers/push.py --dir ${{ inputs.folder }} --version ${{ inputs.version }} + run: python3 docker-wrappers/push.py --dir ${{ inputs.folder }} --version ${{ inputs.version }} --yes From 800e727c6eeab7e62832f48ca078aaa28dae4c80 Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Thu, 3 Jul 2025 17:19:42 +0000 Subject: [PATCH 04/34] feat: tag, latest and such --- docker-wrappers/push.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/docker-wrappers/push.py b/docker-wrappers/push.py index 19653f3cb..339c015f5 100644 --- a/docker-wrappers/push.py +++ b/docker-wrappers/push.py @@ -1,7 +1,7 @@ import argparse -import subprocess -import os import json +import os +import subprocess from pathlib import Path COMMAND_BUILDX = ["docker", "buildx"] @@ -12,8 +12,11 @@ # https://stackoverflow.com/a/5137509/7589775 dir_path = os.path.dirname(os.path.realpath(__file__)) -def construct_push_command(tag: str, dir: str): - base_cmd = ["build", "--tag", tag, "--file", Path(dir_path, dir, "Dockerfile"), "--platform", +def construct_push_command(tags: list[str], dir: str): + base_cmd = ["build"] + for tag in tags: + base_cmd.extend(["--tag", tag]) + base_cmd = base_cmd + ["--file", Path(dir_path, dir, "Dockerfile"), "--platform", "linux/arm64,linux/amd64", "--builder", "container", "--push", "."] return COMMAND_BUILDX + base_cmd @@ -32,16 +35,16 @@ def parse_arguments(): def main(): # We need a buildx environment # This is a terrible check. Yes, docker buildx has no API exposed on docker-py. - if not f"\ncontainer" in subprocess.check_output(COMMAND_BUILDER_LS).decode("utf-8"): + if f"\ncontainer" not in subprocess.check_output(COMMAND_BUILDER_LS).decode("utf-8"): out = subprocess.run(COMMAND_BUILDER_INSTANCE) if out.returncode != 0: raise RuntimeError(f"Command {COMMAND_BUILDER_INSTANCE} exited with non-zero exit code.") - + args = parse_arguments() if not args.org_name.endswith("/"): args.org_name = f"{args.org_name}/" - + if not args.version.startswith("v"): if not args.relax: raise ValueError("All versions start with v (v1, v2, ...)") @@ -49,13 +52,14 @@ def main(): metadata_path = Path(dir_path, args.dir, "metadata.json") name = json.loads(metadata_path.read_text())['dockerName'] tag = args.org_name + name + ":" + args.version - - push_command = construct_push_command(tag, args.dir) + tag_latest = args.org_name + name + ":latest" if not args.yes: - confirm = input(f"[y/n] Are you sure you want to push to {tag}? ") + confirm = input(f"[y/n] Are you sure you want to push to {tag} (w/ latest {tag_latest})? ") if confirm.strip().lower() not in ('y', 'yes'): raise RuntimeError("Did not confirm dialog.") + + push_command = construct_push_command([tag, tag_latest], args.dir) subprocess.run(push_command, capture_output=False) if __name__ == '__main__': From 57998e398843cf88aecb8f514e3a76cc26431d03 Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Thu, 3 Jul 2025 18:42:17 +0000 Subject: [PATCH 05/34] chore: forcibly break ci --- config/config.yaml | 6 +++--- docker-wrappers/push.py | 6 +++--- spras/allpairs.py | 2 +- spras/analysis/cytoscape.py | 2 +- spras/btb.py | 2 +- spras/meo.py | 2 +- spras/mincostflow.py | 2 +- spras/omicsintegrator1.py | 2 +- spras/omicsintegrator2.py | 2 +- spras/pathlinker.py | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index e5f616a90..6122f5b21 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -21,10 +21,10 @@ unpack_singularity: false # Note that this assumes container names are consistent across registries, and that the # registry being passed doesn't require authentication for pull actions container_registry: - base_url: docker.io + base_url: ghcr.io # The owner or project of the registry - # For example, "reedcompbio" if the image is available as docker.io/reedcompbio/allpairs - owner: reedcompbio + # For example, "reed-compbio" if the image is available as ghcr.io/reed-compbio/allpairs + owner: reed-compbio # This list of algorithms should be generated by a script which checks the filesystem for installs. # It shouldn't be changed by mere mortals. (alternatively, we could add a path to executable for each algorithm diff --git a/docker-wrappers/push.py b/docker-wrappers/push.py index 339c015f5..483f22364 100644 --- a/docker-wrappers/push.py +++ b/docker-wrappers/push.py @@ -27,8 +27,8 @@ def parse_arguments(): parser.add_argument("--dir", type=str, required=True, help="The directory of the docker wrapper to use") parser.add_argument("--version", type=str, required=True, help="The version (tag name) to use for the container") parser.add_argument("--org-name", type=str, help="The organization to push to", default="ghcr.io/reed-compbio/") - parser.add_argument("--yes", type=bool, help="Whether to automatically agree to pushing a container") - parser.add_argument("--relax", type=bool, help="Whether to not be strict on tag naming") + parser.add_argument("--yes", type=bool, help="Whether to automatically agree to pushing a container", action=argparse.BooleanOptionalAction) + parser.add_argument("--relax", type=bool, help="Whether to not be strict on tag naming", action=argparse.BooleanOptionalAction) return parser.parse_args() @@ -60,7 +60,7 @@ def main(): raise RuntimeError("Did not confirm dialog.") push_command = construct_push_command([tag, tag_latest], args.dir) - subprocess.run(push_command, capture_output=False) + subprocess.run(push_command, capture_output=False, cwd=str(Path(dir_path, args.dir))) if __name__ == '__main__': main() diff --git a/spras/allpairs.py b/spras/allpairs.py index b462ed71c..f4589e6aa 100644 --- a/spras/allpairs.py +++ b/spras/allpairs.py @@ -105,7 +105,7 @@ def run(nodetypes=None, network=None, directed_flag=None, output_file=None, cont if Path(directed_flag).read_text().strip() == "true": command.append("--directed") - container_suffix = "allpairs:v4" + container_suffix = "allpairs:v1" run_container_and_log( 'All Pairs Shortest Paths', container_framework, diff --git a/spras/analysis/cytoscape.py b/spras/analysis/cytoscape.py index 3bebc30ae..47ab0a2da 100644 --- a/spras/analysis/cytoscape.py +++ b/spras/analysis/cytoscape.py @@ -46,7 +46,7 @@ def run_cytoscape(pathways: List[Union[str, PurePath]], output_file: str, contai # Provided the mapped pathway file path and the original file path as the label Cytoscape command.extend(['--pathway', f'{mapped_pathway}|{pathway}']) - container_suffix = "py4cytoscape:v3" + container_suffix = "py4cytoscape:v1" run_container_and_log('Cytoscape', container_framework, container_suffix, diff --git a/spras/btb.py b/spras/btb.py index 416395a55..3baa26d32 100644 --- a/spras/btb.py +++ b/spras/btb.py @@ -133,7 +133,7 @@ def run(sources=None, targets=None, edges=None, output_file=None, container_fram '--output_file', mapped_out_prefix] - container_suffix = "bowtiebuilder:v2" + container_suffix = "bowtiebuilder:v1" run_container_and_log('BowTieBuilder', container_framework, container_suffix, diff --git a/spras/meo.py b/spras/meo.py index 3dc2dd863..597740b61 100644 --- a/spras/meo.py +++ b/spras/meo.py @@ -176,7 +176,7 @@ def run(edges=None, sources=None, targets=None, output_file=None, max_path_lengt command = ['java', '-jar', '/meo/EOMain.jar', properties_file] - container_suffix = "meo" + container_suffix = "meo:v1" run_container_and_log('Maximum Edge Orientation', container_framework, container_suffix, diff --git a/spras/mincostflow.py b/spras/mincostflow.py index bc60dea9e..9a90c570f 100644 --- a/spras/mincostflow.py +++ b/spras/mincostflow.py @@ -112,7 +112,7 @@ def run(sources=None, targets=None, edges=None, output_file=None, flow=None, cap command.extend(['--capacity', str(capacity)]) # choosing to run in docker or singularity container - container_suffix = "mincostflow" + container_suffix = "mincostflow:v1" # constructs a docker run call run_container_and_log('MinCostFlow', diff --git a/spras/omicsintegrator1.py b/spras/omicsintegrator1.py index 1d308355f..0621c55bf 100644 --- a/spras/omicsintegrator1.py +++ b/spras/omicsintegrator1.py @@ -189,7 +189,7 @@ def run(edges=None, prizes=None, dummy_nodes=None, dummy_mode=None, mu_squared=N container_suffix = "omics-integrator-1:no-conda" # no-conda version is the default run_container_and_log('Omics Integrator 1', container_framework, - container_suffix, # no-conda version is the default + container_suffix, command, volumes, work_dir, diff --git a/spras/omicsintegrator2.py b/spras/omicsintegrator2.py index 639f297c6..d1f28e3b9 100644 --- a/spras/omicsintegrator2.py +++ b/spras/omicsintegrator2.py @@ -118,7 +118,7 @@ def run(edges=None, prizes=None, output_file=None, w=None, b=None, g=None, noise if seed is not None: command.extend(['--seed', str(seed)]) - container_suffix = "omics-integrator-2:v2" + container_suffix = "omics-integrator-2:v1" run_container_and_log('Omics Integrator 2', container_framework, container_suffix, diff --git a/spras/pathlinker.py b/spras/pathlinker.py index 0a50ffb41..4809e20aa 100644 --- a/spras/pathlinker.py +++ b/spras/pathlinker.py @@ -113,7 +113,7 @@ def run(nodetypes=None, network=None, output_file=None, k=None, container_framew if k is not None: command.extend(['-k', str(k)]) - container_suffix = "pathlinker:v2" + container_suffix = "pathlinker:v1" run_container_and_log('PathLinker', container_framework, container_suffix, From f94733268ee725b52e3016e384bb8085ffa0dc9c Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Thu, 3 Jul 2025 20:23:50 +0000 Subject: [PATCH 06/34] feat: better push support over metadata --- docker-wrappers/AllPairs/metadata.json | 3 ++- docker-wrappers/BowTieBuilder/metadata.json | 3 ++- docker-wrappers/Cytoscape/metadata.json | 3 ++- docker-wrappers/DOMINO/metadata.json | 3 ++- docker-wrappers/MEO/metadata.json | 3 ++- docker-wrappers/MinCostFlow/metadata.json | 3 ++- docker-wrappers/OmicsIntegrator1/Dockerfile | 14 ++++------ .../OmicsIntegrator1/Dockerfile_no_conda | 26 ------------------- .../OmicsIntegrator1/metadata.json | 3 ++- .../OmicsIntegrator2/metadata.json | 3 ++- docker-wrappers/PathLinker/metadata.json | 3 ++- docker-wrappers/RWR/metadata.json | 3 ++- docker-wrappers/SPRAS/metadata.json | 4 ++- docker-wrappers/ST_RWR/metadata.json | 3 ++- docker-wrappers/push.py | 19 +++++++++----- 15 files changed, 43 insertions(+), 53 deletions(-) delete mode 100644 docker-wrappers/OmicsIntegrator1/Dockerfile_no_conda diff --git a/docker-wrappers/AllPairs/metadata.json b/docker-wrappers/AllPairs/metadata.json index d08ca6a63..01c8b0b3e 100644 --- a/docker-wrappers/AllPairs/metadata.json +++ b/docker-wrappers/AllPairs/metadata.json @@ -1,3 +1,4 @@ { - "dockerName": "allpairs" + "dockerName": "allpairs", + "architectures": ["linux/arm64", "linux/amd64"] } diff --git a/docker-wrappers/BowTieBuilder/metadata.json b/docker-wrappers/BowTieBuilder/metadata.json index c83457ced..ef3177c80 100644 --- a/docker-wrappers/BowTieBuilder/metadata.json +++ b/docker-wrappers/BowTieBuilder/metadata.json @@ -1,3 +1,4 @@ { - "dockerName": "bowtiebuilder" + "dockerName": "bowtiebuilder", + "architectures": ["linux/arm64", "linux/amd64"] } diff --git a/docker-wrappers/Cytoscape/metadata.json b/docker-wrappers/Cytoscape/metadata.json index 4fbd1d6d0..cc78caa46 100644 --- a/docker-wrappers/Cytoscape/metadata.json +++ b/docker-wrappers/Cytoscape/metadata.json @@ -1,3 +1,4 @@ { - "dockerName": "py4cytoscape" + "dockerName": "py4cytoscape", + "architectures": ["linux/arm64", "linux/amd64"] } diff --git a/docker-wrappers/DOMINO/metadata.json b/docker-wrappers/DOMINO/metadata.json index 46e5d94d5..34a5109af 100644 --- a/docker-wrappers/DOMINO/metadata.json +++ b/docker-wrappers/DOMINO/metadata.json @@ -1,3 +1,4 @@ { - "dockerName": "domino" + "dockerName": "domino", + "architectures": ["linux/amd64"] } diff --git a/docker-wrappers/MEO/metadata.json b/docker-wrappers/MEO/metadata.json index dfe1a0b1f..71ad2925b 100644 --- a/docker-wrappers/MEO/metadata.json +++ b/docker-wrappers/MEO/metadata.json @@ -1,3 +1,4 @@ { - "dockerName": "meo" + "dockerName": "meo", + "architectures": ["linux/arm64", "linux/amd64"] } diff --git a/docker-wrappers/MinCostFlow/metadata.json b/docker-wrappers/MinCostFlow/metadata.json index b27e8ec7d..a8b1803ff 100644 --- a/docker-wrappers/MinCostFlow/metadata.json +++ b/docker-wrappers/MinCostFlow/metadata.json @@ -1,3 +1,4 @@ { - "dockerName": "mincostflow" + "dockerName": "mincostflow", + "architectures": ["linux/arm64", "linux/amd64"] } diff --git a/docker-wrappers/OmicsIntegrator1/Dockerfile b/docker-wrappers/OmicsIntegrator1/Dockerfile index e92b98ead..2cfaf1b8f 100644 --- a/docker-wrappers/OmicsIntegrator1/Dockerfile +++ b/docker-wrappers/OmicsIntegrator1/Dockerfile @@ -1,12 +1,10 @@ # Omics Integrator 1 wrapper # https://github.com/fraenkel-lab/OmicsIntegrator -# Activates the conda environment before running command inside container -# Uses the strategy from https://pythonspeed.com/articles/activate-conda-dockerfile/ -# by Itamar Turner-Trauring -FROM continuumio/miniconda3:4.9.2 +# This version does not use conda +FROM python:2.7.18 # Need to install msgsteiner-1.3 and dependencies -RUN apt-get -qq update --allow-releaseinfo-change && \ +RUN apt-get -qq update && \ apt-get install -y build-essential libx11-dev libboost-dev libboost-program-options-dev RUN commit=0a57ede6beeef6e63b86d19898e560d62015e85d && \ @@ -24,7 +22,5 @@ RUN commit=0a57ede6beeef6e63b86d19898e560d62015e85d && \ ENV MSGSTEINER_PATH=/OmicsIntegrator/msgsteiner-1.3/msgsteiner WORKDIR /OmicsIntegrator -COPY environment.yml . -RUN conda env create -f environment.yml - -ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "oi1"] +COPY requirements.txt . +RUN pip install -r requirements.txt diff --git a/docker-wrappers/OmicsIntegrator1/Dockerfile_no_conda b/docker-wrappers/OmicsIntegrator1/Dockerfile_no_conda deleted file mode 100644 index 2cfaf1b8f..000000000 --- a/docker-wrappers/OmicsIntegrator1/Dockerfile_no_conda +++ /dev/null @@ -1,26 +0,0 @@ -# Omics Integrator 1 wrapper -# https://github.com/fraenkel-lab/OmicsIntegrator -# This version does not use conda -FROM python:2.7.18 - -# Need to install msgsteiner-1.3 and dependencies -RUN apt-get -qq update && \ - apt-get install -y build-essential libx11-dev libboost-dev libboost-program-options-dev - -RUN commit=0a57ede6beeef6e63b86d19898e560d62015e85d && \ - wget https://github.com/fraenkel-lab/OmicsIntegrator/tarball/$commit && \ - tar -zxvf $commit && \ - rm $commit && \ - mv fraenkel-lab-OmicsIntegrator-* OmicsIntegrator && \ - cd OmicsIntegrator/ && \ - wget http://staff.polito.it/alfredo.braunstein/code/msgsteiner-1.3.tgz && \ - tar -zxvf msgsteiner-1.3.tgz && \ - cd msgsteiner-1.3 && \ - patch Makefile ../patches/Makefile.linux.patch && \ - make - -ENV MSGSTEINER_PATH=/OmicsIntegrator/msgsteiner-1.3/msgsteiner -WORKDIR /OmicsIntegrator - -COPY requirements.txt . -RUN pip install -r requirements.txt diff --git a/docker-wrappers/OmicsIntegrator1/metadata.json b/docker-wrappers/OmicsIntegrator1/metadata.json index 562504084..d2a93fca8 100644 --- a/docker-wrappers/OmicsIntegrator1/metadata.json +++ b/docker-wrappers/OmicsIntegrator1/metadata.json @@ -1,3 +1,4 @@ { - "dockerName": "omics-integrator-1" + "dockerName": "omics-integrator-1", + "architectures": ["linux/amd64"] } diff --git a/docker-wrappers/OmicsIntegrator2/metadata.json b/docker-wrappers/OmicsIntegrator2/metadata.json index 74b5833f0..d82fdb812 100644 --- a/docker-wrappers/OmicsIntegrator2/metadata.json +++ b/docker-wrappers/OmicsIntegrator2/metadata.json @@ -1,3 +1,4 @@ { - "dockerName": "omics-integrator-2" + "dockerName": "omics-integrator-2", + "architectures": ["linux/amd64"] } diff --git a/docker-wrappers/PathLinker/metadata.json b/docker-wrappers/PathLinker/metadata.json index 708f7e9dd..ca939a90e 100644 --- a/docker-wrappers/PathLinker/metadata.json +++ b/docker-wrappers/PathLinker/metadata.json @@ -1,3 +1,4 @@ { - "dockerName": "pathlinker" + "dockerName": "pathlinker", + "architectures": ["linux/arm64", "linux/amd64"] } diff --git a/docker-wrappers/RWR/metadata.json b/docker-wrappers/RWR/metadata.json index 2609edae9..bc768cb83 100644 --- a/docker-wrappers/RWR/metadata.json +++ b/docker-wrappers/RWR/metadata.json @@ -1,3 +1,4 @@ { - "dockerName": "rwr" + "dockerName": "rwr", + "architectures": ["linux/arm64", "linux/amd64"] } diff --git a/docker-wrappers/SPRAS/metadata.json b/docker-wrappers/SPRAS/metadata.json index 791992281..20411b2fd 100644 --- a/docker-wrappers/SPRAS/metadata.json +++ b/docker-wrappers/SPRAS/metadata.json @@ -1,3 +1,5 @@ { - "dockerName": "spras" + "dockerName": "spras", + "architectures": ["linux/arm64", "linux/amd64"], + "cwd": "../../" } diff --git a/docker-wrappers/ST_RWR/metadata.json b/docker-wrappers/ST_RWR/metadata.json index 30e05f94d..9f04060fd 100644 --- a/docker-wrappers/ST_RWR/metadata.json +++ b/docker-wrappers/ST_RWR/metadata.json @@ -1,3 +1,4 @@ { - "dockerName": "st-rwr" + "dockerName": "st-rwr", + "architectures": ["linux/arm64", "linux/amd64"] } diff --git a/docker-wrappers/push.py b/docker-wrappers/push.py index 483f22364..76684f410 100644 --- a/docker-wrappers/push.py +++ b/docker-wrappers/push.py @@ -12,12 +12,12 @@ # https://stackoverflow.com/a/5137509/7589775 dir_path = os.path.dirname(os.path.realpath(__file__)) -def construct_push_command(tags: list[str], dir: str): +def construct_push_command(tags: list[str], dir: str, architectures: list[str]): base_cmd = ["build"] for tag in tags: base_cmd.extend(["--tag", tag]) base_cmd = base_cmd + ["--file", Path(dir_path, dir, "Dockerfile"), "--platform", - "linux/arm64,linux/amd64", "--builder", "container", "--push", "."] + ",".join(architectures), "--builder", "container", "--push", "."] return COMMAND_BUILDX + base_cmd def parse_arguments(): @@ -50,17 +50,24 @@ def main(): raise ValueError("All versions start with v (v1, v2, ...)") metadata_path = Path(dir_path, args.dir, "metadata.json") - name = json.loads(metadata_path.read_text())['dockerName'] + metadata = json.loads(metadata_path.read_text()) + name = metadata['dockerName'] + architectures = metadata['architectures'] + cwd = str(Path(dir_path, args.dir, metadata['cwd']) if 'cwd' in metadata else Path(dir_path, args.dir)) tag = args.org_name + name + ":" + args.version tag_latest = args.org_name + name + ":latest" + print(f"Building {name} over {architectures} with:") + print(f"- CWD: {cwd}") + print(f"- Specified tag: {tag}") + print(f"- Latest tag: {tag_latest}") if not args.yes: - confirm = input(f"[y/n] Are you sure you want to push to {tag} (w/ latest {tag_latest})? ") + confirm = input("[y/n] Are you sure you want to push to these tags over these architectures? ") if confirm.strip().lower() not in ('y', 'yes'): raise RuntimeError("Did not confirm dialog.") - push_command = construct_push_command([tag, tag_latest], args.dir) - subprocess.run(push_command, capture_output=False, cwd=str(Path(dir_path, args.dir))) + push_command = construct_push_command([tag, tag_latest], args.dir, architectures) + subprocess.run(push_command, capture_output=False, cwd=cwd) if __name__ == '__main__': main() From 367ea7291868f26ef672f271f09ab77373fc29ac Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Thu, 3 Jul 2025 20:40:33 +0000 Subject: [PATCH 07/34] chore: bmp oi1 --- spras/omicsintegrator1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spras/omicsintegrator1.py b/spras/omicsintegrator1.py index 0621c55bf..14f572d53 100644 --- a/spras/omicsintegrator1.py +++ b/spras/omicsintegrator1.py @@ -186,7 +186,7 @@ def run(edges=None, prizes=None, dummy_nodes=None, dummy_mode=None, mu_squared=N if seed is not None: command.extend(['--seed', str(seed)]) - container_suffix = "omics-integrator-1:no-conda" # no-conda version is the default + container_suffix = "omics-integrator-1:v1" # no-conda version is the default run_container_and_log('Omics Integrator 1', container_framework, container_suffix, From b7c9e2cfe76c3951b050d1d77748781585cc8cf3 Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Thu, 3 Jul 2025 20:46:41 +0000 Subject: [PATCH 08/34] ci: test using ghcr --- .github/workflows/build-containers.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index afdca2850..146b38782 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -12,52 +12,52 @@ jobs: uses: "./.github/workflows/build-and-remove-template.yml" with: path: docker-wrappers/OmicsIntegrator1 - container: reedcompbio/omics-integrator-1 + container: ghcr.io/reed-compbio/omics-integrator-1 build-and-remove-omics2: uses: "./.github/workflows/build-and-remove-template.yml" with: path: docker-wrappers/OmicsIntegrator2 - container: reedcompbio/omics-integrator-2 + container: ghcr.io/reed-compbio/omics-integrator-2 build-and-remove-pathlinker: uses: "./.github/workflows/build-and-remove-template.yml" with: path: docker-wrappers/PathLinker - container: reedcompbio/pathlinker + container: ghcr.io/reed-compbio/pathlinker build-and-remove-meo: uses: "./.github/workflows/build-and-remove-template.yml" with: path: docker-wrappers/MEO - container: reedcompbio/meo + container: ghcr.io/reed-compbio/meo build-and-remove-mincostflow: uses: "./.github/workflows/build-and-remove-template.yml" with: path: docker-wrappers/MinCostFlow - container: reedcompbio/mincostflow + container: ghcr.io/reed-compbio/mincostflow build-and-remove-allpairs: uses: "./.github/workflows/build-and-remove-template.yml" with: path: docker-wrappers/AllPairs - container: reedcompbio/allpairs + container: ghcr.io/reed-compbio/allpairs build-and-remove-domino: uses: "./.github/workflows/build-and-remove-template.yml" with: path: docker-wrappers/DOMINO - container: reedcompbio/domino + container: ghcr.io/reed-compbio/domino build-and-remove-btb: uses: "./.github/workflows/build-and-remove-template.yml" with: path: docker-wrappers/BowTieBuilder - container: reedcompbio/bowtiebuilder + container: ghcr.io/reed-compbio/bowtiebuilder build-and-remove-cytoscape: uses: "./.github/workflows/build-and-remove-template.yml" with: path: docker-wrappers/Cytoscape - container: reedcompbio/py4cytoscape + container: ghcr.io/reed-compbio/py4cytoscape build-and-remove-spras: uses: "./.github/workflows/build-and-remove-template.yml" with: path: docker-wrappers/SPRAS - container: reedcompbio/spras + container: ghcr.io/reed-compbio/spras # Since any change to the SPRAS codebase would constitute a change to # the container we produce in this step, build the container regardless # of detected changes. From eb5ae6678e306f75c343fdba541899c51e5d877e Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Thu, 3 Jul 2025 21:06:39 +0000 Subject: [PATCH 09/34] chore: specify v1 for domino --- spras/domino.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spras/domino.py b/spras/domino.py index 51ed202ff..358a20ee1 100644 --- a/spras/domino.py +++ b/spras/domino.py @@ -112,7 +112,7 @@ def run(network=None, active_genes=None, output_file=None, slice_threshold=None, '--network_file', network_file, '--output_file', mapped_slices_file] - container_suffix = "domino" + container_suffix = "domino:v1" run_container_and_log('slicer', container_framework, container_suffix, From 5dccba4c4a4c34341bd668ab85ff18fc170d80aa Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Mon, 7 Jul 2025 11:04:16 -0700 Subject: [PATCH 10/34] docs: drop 'no-conda' --- spras/omicsintegrator1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spras/omicsintegrator1.py b/spras/omicsintegrator1.py index 14f572d53..10a75f6d8 100644 --- a/spras/omicsintegrator1.py +++ b/spras/omicsintegrator1.py @@ -186,7 +186,7 @@ def run(edges=None, prizes=None, dummy_nodes=None, dummy_mode=None, mu_squared=N if seed is not None: command.extend(['--seed', str(seed)]) - container_suffix = "omics-integrator-1:v1" # no-conda version is the default + container_suffix = "omics-integrator-1:v1" run_container_and_log('Omics Integrator 1', container_framework, container_suffix, From 2e40235aee62c983fa38b131c6ad30f355d7d6eb Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Fri, 29 Aug 2025 19:58:13 -0700 Subject: [PATCH 11/34] docs: update docker references to ghcr --- .github/workflows/build-containers.yml | 2 +- .github/workflows/release.yml | 6 +++--- README.md | 2 +- config/egfr.yaml | 6 +++--- docker-wrappers/AllPairs/README.md | 6 +++--- docker-wrappers/BowTieBuilder/README.md | 4 ++-- docker-wrappers/Cytoscape/README.md | 4 ++-- docker-wrappers/DOMINO/README.md | 6 +++--- docker-wrappers/MEO/README.md | 4 ++-- docker-wrappers/MinCostFlow/README.md | 10 +++++----- docker-wrappers/OmicsIntegrator1/README.md | 12 ++++++------ docker-wrappers/OmicsIntegrator2/README.md | 8 ++++---- docker-wrappers/PathLinker/README.md | 8 ++++---- docker-wrappers/RWR/README.md | 4 ++-- docker-wrappers/ResponseNet/README.md | 2 +- docker-wrappers/SPRAS/README.md | 12 ++++++------ docker-wrappers/SPRAS/example_config.yaml | 6 +++--- docker-wrappers/SPRAS/spras.sub | 2 +- docker-wrappers/ST_RWR/README.md | 4 ++-- docs/contributing/index.rst | 2 +- docs/install.rst | 4 ++-- spras/config/config.py | 4 ++-- test/analysis/input/config.yaml | 6 +++--- test/analysis/input/egfr.yaml | 6 +++--- test/generate-inputs/inputs/test_config.yaml | 4 ++-- test/test_config.py | 10 +++++----- 26 files changed, 72 insertions(+), 72 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 90f0f2818..65d5e20af 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -57,7 +57,7 @@ jobs: uses: "./.github/workflows/build-and-remove-template.yml" with: path: docker-wrappers/ResponseNet - container: reedcompbio/responsenet + container: reed-compbio/responsenet build-and-remove-spras: uses: "./.github/workflows/build-and-remove-template.yml" with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf4ee6157..44e9c1495 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,9 +35,9 @@ jobs: context: ./ file: docker-wrappers/SPRAS/Dockerfile tags: | - reedcompbio/spras:${{ github.ref_name }} - reedcompbio/spras:latest + reed-compbio/spras:${{ github.ref_name }} + reed-compbio/spras:latest # Use the previous latest for the build cache, assuming they're probably # relatively similar - cache-from: type=registry,ref=reedcompbio/spras:latest + cache-from: type=registry,ref=reed-compbio/spras:latest push: true diff --git a/README.md b/README.md index 026b20398..8b5853430 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Large SPRAS workflows may benefit from execution with HTCondor, a scheduler/mana **Dockerized pathway reconstruction algorithms**: Pathway reconstruction algorithms are run via Docker images using the docker-py Python package. [PathLinker](https://github.com/Murali-group/PathLinker), [Omics Integrator](https://github.com/fraenkel-lab/OmicsIntegrator), [Omics Integrator 2](https://github.com/fraenkel-lab/OmicsIntegrator2), and [Maximum Edge Orientation](https://github.com/agitter/meo/) are the first supported algorithms. The files to create these Docker images are in the `docker-wrappers` subdirectory along with links to algorithms' original repositories. -The Docker images are available on [DockerHub](https://hub.docker.com/orgs/reedcompbio). +The Docker images are available on [DockerHub](https://hub.docker.com/orgs/reed-compbio). **Python wrapper for calling algorithms**: Wrapper functions provide an interface between the common file formats for input and output data and the algorithm-specific file formats and reconstruction commands. These wrappers are in the `spras/` subdirectory. diff --git a/config/egfr.yaml b/config/egfr.yaml index 667cb55f0..3396a9e3d 100644 --- a/config/egfr.yaml +++ b/config/egfr.yaml @@ -19,10 +19,10 @@ unpack_singularity: false # Note that this assumes container names are consistent across registries, and that the # registry being passed doesn't require authentication for pull actions container_registry: - base_url: docker.io + base_url: ghcr.io # The owner or project of the registry - # For example, "reedcompbio" if the image is available as docker.io/reedcompbio/allpairs - owner: reedcompbio + # For example, "reed-compbio" if the image is available as ghcr.io/reed-compbio/allpairs + owner: reed-compbio algorithms: - name: pathlinker diff --git a/docker-wrappers/AllPairs/README.md b/docker-wrappers/AllPairs/README.md index 863b12dc3..3266fbe12 100644 --- a/docker-wrappers/AllPairs/README.md +++ b/docker-wrappers/AllPairs/README.md @@ -1,17 +1,17 @@ # All Pairs Shortest Paths Docker image -A Docker image for All Pairs Shortest Paths that is available on [DockerHub](https://hub.docker.com/repository/docker/reedcompbio/allpairs). +A Docker image for All Pairs Shortest Paths that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/allpairs). This algorithm was implemented by the SPRAS team and relies on the NetworkX [`shortest_path`](https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.shortest_paths.generic.shortest_path.html) function. To create the Docker image run: ``` -docker build -t reedcompbio/allpairs -f Dockerfile . +docker build -t reed-compbio/allpairs -f Dockerfile . ``` from this directory. To inspect the installed Python packages: ``` -docker run reedcompbio/allpairs pip list +docker run reed-compbio/allpairs pip list ``` diff --git a/docker-wrappers/BowTieBuilder/README.md b/docker-wrappers/BowTieBuilder/README.md index d0b80ee76..b0cf52dbf 100644 --- a/docker-wrappers/BowTieBuilder/README.md +++ b/docker-wrappers/BowTieBuilder/README.md @@ -1,10 +1,10 @@ # BowTieBuilder Docker image -A Docker image for [BowTieBuilder](https://github.com/Reed-CompBio/BowTieBuilder-Algorithm) that is available on [DockerHub](https://hub.docker.com/repository/docker/reedcompbio/bowtiebuilder). +A Docker image for [BowTieBuilder](https://github.com/Reed-CompBio/BowTieBuilder-Algorithm) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/bowtiebuilder). To create the Docker image run: ``` -docker build -t reedcompbio/bowtiebuilder:v2 -f Dockerfile . +docker build -t reed-compbio/bowtiebuilder:v2 -f Dockerfile . ``` from this directory. diff --git a/docker-wrappers/Cytoscape/README.md b/docker-wrappers/Cytoscape/README.md index c3cb89672..d48c72ef9 100644 --- a/docker-wrappers/Cytoscape/README.md +++ b/docker-wrappers/Cytoscape/README.md @@ -1,6 +1,6 @@ # Cytoscape image -A Docker image for [Cytoscape](https://cytoscape.org/) that is available on [DockerHub](https://hub.docker.com/repository/docker/reedcompbio/py4cytoscape). +A Docker image for [Cytoscape](https://cytoscape.org/) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/py4cytoscape). It was originally derived from the [`docker-cytoscape-desktop/py4cytoscape`](https://github.com/cytoscape/docker-cytoscape-desktop/blob/173ab46b4b5e5c148113ad0c9960a6af3fc50432/py4cytoscape/Dockerfile) image. Thank you to Scooter Morris for help debugging problems running Cytoscape in Singularity. @@ -9,7 +9,7 @@ Thank you to Scooter Morris for help debugging problems running Cytoscape in Sin To create the Docker image run: ``` -docker build -t reedcompbio/py4cytoscape -f Dockerfile . +docker build -t reed-compbio/py4cytoscape -f Dockerfile . ``` from this directory. diff --git a/docker-wrappers/DOMINO/README.md b/docker-wrappers/DOMINO/README.md index 610c73bc8..e7704a5df 100644 --- a/docker-wrappers/DOMINO/README.md +++ b/docker-wrappers/DOMINO/README.md @@ -1,19 +1,19 @@ # DOMINO Docker image -A Docker image for [DOMINO](https://github.com/Shamir-Lab/DOMINO) that is available on [DockerHub](https://hub.docker.com/repository/docker/reedcompbio/domino). +A Docker image for [DOMINO](https://github.com/Shamir-Lab/DOMINO) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/domino). DOMINO outputs multiple active modules, which SPRAS combines into a single pathway. It is [non-deterministic](https://github.com/Shamir-Lab/DOMINO/issues/5) and cannot be made deterministic with a seed. To create the Docker image run: ``` -docker build -t reedcompbio/domino -f Dockerfile . +docker build -t reed-compbio/domino -f Dockerfile . ``` from this directory. To inspect the installed Python packages: ``` -winpty docker run reedcompbio/domino pip list +winpty docker run reed-compbio/domino pip list ``` The `winpty` prefix is only needed on Windows. diff --git a/docker-wrappers/MEO/README.md b/docker-wrappers/MEO/README.md index c9acfc5f7..d6155e86c 100644 --- a/docker-wrappers/MEO/README.md +++ b/docker-wrappers/MEO/README.md @@ -1,13 +1,13 @@ # Maximum Edge Orientation Docker image -A Docker image for [Maximum Edge Orientation](https://github.com/agitter/meo/) that is available on [DockerHub](https://hub.docker.com/repository/docker/reedcompbio/meo). +A Docker image for [Maximum Edge Orientation](https://github.com/agitter/meo/) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/meo). Only supports the Random orientation algorithm, not MINSAT or MAXCSP. ## Building the Docker image To create the Docker image run: ``` -docker build -t reedcompbio/meo -f Dockerfile . +docker build -t reed-compbio/meo -f Dockerfile . ``` from this directory. diff --git a/docker-wrappers/MinCostFlow/README.md b/docker-wrappers/MinCostFlow/README.md index 014a3d757..0fc16cc76 100644 --- a/docker-wrappers/MinCostFlow/README.md +++ b/docker-wrappers/MinCostFlow/README.md @@ -1,20 +1,20 @@ # MinCostFlow Docker image -A Docker image for [MinCostFlow](https://github.com/gitter-lab/min-cost-flow) that is available on [DockerHub](https://hub.docker.com/repository/docker/reedcompbio/mincostflow). +A Docker image for [MinCostFlow](https://github.com/gitter-lab/min-cost-flow) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/mincostflow). To create the Docker image run: ``` -docker build -t reedcompbio/mincostflow -f Dockerfile . +docker build -t reed-compbio/mincostflow -f Dockerfile . ``` from this directory. To inspect the installed Python packages: ``` -docker run reedcompbio/mincostflow pip list +docker run reed-compbio/mincostflow pip list ``` or inspect the Python script arguments: ``` -docker run reedcompbio/mincostflow python /MinCostFlow/minCostFlow.py -h +docker run reed-compbio/mincostflow python /MinCostFlow/minCostFlow.py -h ``` Windows users may need to add the prefix `winpty` prefix before these commands. @@ -30,7 +30,7 @@ The Docker wrapper can be tested with `pytest -k test_mcf.py` from the root of t Alternatively, to run the Docker image directly, run the following command from the root of the `spras` repository ``` -docker run -w /data --mount type=bind,source=/${PWD},target=/data reedcompbio/mincostflow python /MinCostFlow/minCostFlow.py --edges_file /data/test/MinCostFlow/input/graph1/edges.txt --sources_file /data/test/MinCostFlowinput/graph1/sources.txt --targets_file /data/test/MinCostFlowinput/graph1/targets.txt --flow 1 --output graph1 --capacity 1 +docker run -w /data --mount type=bind,source=/${PWD},target=/data reed-compbio/mincostflow python /MinCostFlow/minCostFlow.py --edges_file /data/test/MinCostFlow/input/graph1/edges.txt --sources_file /data/test/MinCostFlowinput/graph1/sources.txt --targets_file /data/test/MinCostFlowinput/graph1/targets.txt --flow 1 --output graph1 --capacity 1 ``` This will run MinCostFlow on the test input files and write the output files to the root of the `spras` repository. diff --git a/docker-wrappers/OmicsIntegrator1/README.md b/docker-wrappers/OmicsIntegrator1/README.md index 1b2ee59b4..c36b896dc 100644 --- a/docker-wrappers/OmicsIntegrator1/README.md +++ b/docker-wrappers/OmicsIntegrator1/README.md @@ -1,6 +1,6 @@ # Omics Integrator 1 Docker image -A Docker image for [Omics Integrator](https://github.com/fraenkel-lab/OmicsIntegrator) that is available on [DockerHub](https://hub.docker.com/repository/docker/reedcompbio/omics-integrator-1). +A Docker image for [Omics Integrator](https://github.com/fraenkel-lab/OmicsIntegrator) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/omics-integrator-1). ## Activating conda inside a Docker container @@ -11,13 +11,13 @@ It defines a custom ENTRYPOINT that uses `conda run` to run the command inside t To create the Docker image run: ``` -docker build -t reedcompbio/omics-integrator-1 -f Dockerfile . +docker build -t reed-compbio/omics-integrator-1 -f Dockerfile . ``` from this directory. To confirm that commands are run inside the conda environment run: ``` -winpty docker run reedcompbio/omics-integrator-1 conda list +winpty docker run reed-compbio/omics-integrator-1 conda list ``` The `winpty` prefix is only needed on Windows. @@ -28,7 +28,7 @@ The Docker wrapper can be tested with `pytest`. The Docker wrapper also can be tested by running the Omics Integrator tests interactively: ``` -winpty docker run -it reedcompbio/omics-integrator-1 bash +winpty docker run -it reed-compbio/omics-integrator-1 bash conda activate oi1 python setup.py test -a "--msgpath=$MSGSTEINER_PATH" ``` @@ -39,9 +39,9 @@ This simplifies using the same image for Docker and Singularity. This version uses `requirements.txt` instead of `environment.yml` to specify required Python packages. It can be built and tested in a manner similar to the conda-based image. ``` -docker build -t reedcompbio/omics-integrator-1:no-conda -f Dockerfile_no_conda . +docker build -t reed-compbio/omics-integrator-1:no-conda -f Dockerfile_no_conda . -winpty docker run -it reedcompbio/omics-integrator-1:no-conda bash +winpty docker run -it reed-compbio/omics-integrator-1:no-conda bash python setup.py test -a "--msgpath=$MSGSTEINER_PATH" ``` diff --git a/docker-wrappers/OmicsIntegrator2/README.md b/docker-wrappers/OmicsIntegrator2/README.md index c7c7d11f9..8ac825aaf 100644 --- a/docker-wrappers/OmicsIntegrator2/README.md +++ b/docker-wrappers/OmicsIntegrator2/README.md @@ -1,19 +1,19 @@ # Omics Integrator 2 Docker image -A Docker image for [Omics Integrator 2](https://github.com/fraenkel-lab/OmicsIntegrator2) that is available on [DockerHub](https://hub.docker.com/repository/docker/reedcompbio/omics-integrator-2). +A Docker image for [Omics Integrator 2](https://github.com/fraenkel-lab/OmicsIntegrator2) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/omics-integrator-2). ## Building the Docker image To create the Docker image run: ``` -docker build -t reedcompbio/omics-integrator-2 -f Dockerfile . +docker build -t reed-compbio/omics-integrator-2 -f Dockerfile . ``` from this directory. To confirm that commands are run inside the conda environment run: ``` -winpty docker run reedcompbio/omics-integrator-2 conda list -winpty docker run reedcompbio/omics-integrator-2 OmicsIntegrator -h +winpty docker run reed-compbio/omics-integrator-2 conda list +winpty docker run reed-compbio/omics-integrator-2 OmicsIntegrator -h ``` The `winpty` prefix is only needed on Windows. diff --git a/docker-wrappers/PathLinker/README.md b/docker-wrappers/PathLinker/README.md index a3e9aea49..61dfe89c8 100644 --- a/docker-wrappers/PathLinker/README.md +++ b/docker-wrappers/PathLinker/README.md @@ -1,16 +1,16 @@ # PathLinker Docker image -A Docker image for [PathLinker](https://github.com/Murali-group/PathLinker) that is available on [DockerHub](https://hub.docker.com/repository/docker/reedcompbio/pathlinker). +A Docker image for [PathLinker](https://github.com/Murali-group/PathLinker) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/pathlinker). To create the Docker image run: ``` -docker build -t reedcompbio/pathlinker -f Dockerfile . +docker build -t reed-compbio/pathlinker -f Dockerfile . ``` from this directory. To inspect the installed Python packages: ``` -winpty docker run reedcompbio/pathlinker pip list +winpty docker run reed-compbio/pathlinker pip list ``` The `winpty` prefix is only needed on Windows. @@ -21,7 +21,7 @@ The Docker wrapper can be tested with `pytest`. Alternatively, to test the Docker image directly, run the following command from the root of the `spras` repository ``` -docker run -w /data --mount type=bind,source=/${PWD},target=/data reedcompbio/pathlinker python /PathLinker/run.py \ +docker run -w /data --mount type=bind,source=/${PWD},target=/data reed-compbio/pathlinker python /PathLinker/run.py \ /data/test/PathLinker/input/sample-in-net.txt /data/test/PathLinker/input/sample-in-nodetypes.txt -k 5 --write-paths ``` This will run PathLinker on the test input files and write the output files to the root of the `spras` repository. diff --git a/docker-wrappers/RWR/README.md b/docker-wrappers/RWR/README.md index 9da37ac49..05bcfd51c 100644 --- a/docker-wrappers/RWR/README.md +++ b/docker-wrappers/RWR/README.md @@ -1,6 +1,6 @@ # Source-Targets Random Walk with Restarts -A Docker image for [RWR](https://github.com/Reed-CompBio/rwr) that is available on [DockerHub](https://hub.docker.com/repository/docker/reedcompbio/rwr). +A Docker image for [RWR](https://github.com/Reed-CompBio/rwr) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/rwr). ## Notes The random walk with restarts algorithm requires a directed input network. However, the algorithm in its current form will accept an undirected input network and interpret it as a directed network. The resulting output from an undirected network does not accurately represent directionality. @@ -9,7 +9,7 @@ The random walk with restarts algorithm requires a directed input network. Howev To build a new docker image for RWR navigate to the /docker-wrappers/rwr directory and enter: ``` -docker build -t reedcompbio/rwr -f Dockerfile . +docker build -t reed-compbio/rwr -f Dockerfile . ``` ## Testing diff --git a/docker-wrappers/ResponseNet/README.md b/docker-wrappers/ResponseNet/README.md index 5ca631527..1a2222e96 100644 --- a/docker-wrappers/ResponseNet/README.md +++ b/docker-wrappers/ResponseNet/README.md @@ -1,3 +1,3 @@ # ResponseNet Docker Image -A Docker image for [ResponseNet](https://github.com/Reed-CompBio/ResponseNet) that is available on [DockerHub](https://hub.docker.com/repository/docker/reedcompbio/responsenet). +A Docker image for [ResponseNet](https://github.com/Reed-CompBio/ResponseNet) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/responsenet). diff --git a/docker-wrappers/SPRAS/README.md b/docker-wrappers/SPRAS/README.md index 36896df11..8ef2efdd7 100644 --- a/docker-wrappers/SPRAS/README.md +++ b/docker-wrappers/SPRAS/README.md @@ -2,7 +2,7 @@ ## Building Images -A Docker image for SPRAS that is available on [DockerHub](https://hub.docker.com/repository/docker/reedcompbio/spras) +A Docker image for SPRAS that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/spras) This image comes bundled with all of the necessary software packages to run SPRAS, and can be used for execution in distributed environments (like HTCondor). To create the Docker image locally, make sure you are in this repository's root directory, and from your terminal run: @@ -11,9 +11,9 @@ To create the Docker image locally, make sure you are in this repository's root docker build -t /: -f docker-wrappers/SPRAS/Dockerfile . ``` -For example, to build this image with the intent of pushing it to DockerHub as reedcompbio/spras:v0.2.0, you'd run: +For example, to build this image with the intent of pushing it to DockerHub as reed-compbio/spras:v0.2.0, you'd run: ```bash -docker build -t reedcompbio/spras:v0.2.0 -f docker-wrappers/SPRAS/Dockerfile . +docker build -t reed-compbio/spras:v0.2.0 -f docker-wrappers/SPRAS/Dockerfile . ``` This will copy the entire SPRAS repository into the container and install SPRAS with `pip`. As such, any changes you've made to the current SPRAS repository will be reflected in version of SPRAS installed in the container. Since SPRAS @@ -38,9 +38,9 @@ Or to temporarily override your system's default during the build, prepend your DOCKER_DEFAULT_PLATFORM=linux/amd64 ``` -For example, to build reedcompbio/spras:v0.2.0 on Apple Silicon as a linux/amd64 container, you'd run: +For example, to build reed-compbio/spras:v0.2.0 on Apple Silicon as a linux/amd64 container, you'd run: ``` -DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build -t reedcompbio/spras:v0.2.0 -f docker-wrappers/SPRAS/Dockerfile . +DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build -t reed-compbio/spras:v0.2.0 -f docker-wrappers/SPRAS/Dockerfile . ``` ### Converting Docker Images to Apptainer/Singularity Images @@ -52,7 +52,7 @@ apptainer build .sif docker:// For example, creating an Apptainer image for the `v0.2.0` SPRAS image might look like: ```bash -apptainer build spras-v0.2.0.sif docker://reedcompbio/spras:v0.2.0 +apptainer build spras-v0.2.0.sif docker://reed-compbio/spras:v0.2.0 ``` After running this command, a new file called `spras-v0.2.0.sif` will exist in the directory where the command was run. diff --git a/docker-wrappers/SPRAS/example_config.yaml b/docker-wrappers/SPRAS/example_config.yaml index 87e996a9c..f7f819196 100644 --- a/docker-wrappers/SPRAS/example_config.yaml +++ b/docker-wrappers/SPRAS/example_config.yaml @@ -14,10 +14,10 @@ unpack_singularity: true # Note that this assumes container names are consistent across registries, and that the # registry being passed doesn't require authentication for pull actions container_registry: - base_url: docker.io + base_url: ghcr.io # The owner or project of the registry - # For example, "reedcompbio" if the image is available as docker.io/reedcompbio/allpairs - owner: reedcompbio + # For example, "reed-compbio" if the image is available as ghcr.io/reed-compbio/allpairs + owner: reed-compbio # This list of algorithms should be generated by a script which checks the filesystem for installs. # It shouldn't be changed by mere mortals. (alternatively, we could add a path to executable for each algorithm diff --git a/docker-wrappers/SPRAS/spras.sub b/docker-wrappers/SPRAS/spras.sub index 01dee32cd..ccdfea116 100644 --- a/docker-wrappers/SPRAS/spras.sub +++ b/docker-wrappers/SPRAS/spras.sub @@ -22,7 +22,7 @@ SNAKEFILE = ../../Snakefile ############################################################ universe = container container_image = .sif -# container_image = docker://reedcompbio/spras:v0.2.0 +# container_image = docker://reed-compbio/spras:v0.2.0 ############################################################ # Specify names for log/stdout/stderr files generated by # diff --git a/docker-wrappers/ST_RWR/README.md b/docker-wrappers/ST_RWR/README.md index 78a332cf4..7a9b7fa99 100644 --- a/docker-wrappers/ST_RWR/README.md +++ b/docker-wrappers/ST_RWR/README.md @@ -1,6 +1,6 @@ # Source-Targets Random Walk with Restarts -A Docker image for [ST-RWR](https://github.com/Reed-CompBio/rwr) that is available on [DockerHub](https://hub.docker.com/repository/docker/reedcompbio/st_rwr). +A Docker image for [ST-RWR](https://github.com/Reed-CompBio/rwr) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/st_rwr). ## Notes The random walk with restarts algorithm requires a directed input network. However, the algorithm in its current form will accept an undirected input network and interpret it as a directed network. The resulting output from an undirected network does not accurately represent directionality. @@ -9,7 +9,7 @@ The random walk with restarts algorithm requires a directed input network. Howev To build a new docker image for ST_RWR navigate to the /docker-wrappers/ST_RWR directory and enter: ``` -docker build -t reedcompbio/st-rwr -f Dockerfile . +docker build -t reed-compbio/st-rwr -f Dockerfile . ``` ## Testing diff --git a/docs/contributing/index.rst b/docs/contributing/index.rst index ae1947b38..87c705908 100644 --- a/docs/contributing/index.rst +++ b/docs/contributing/index.rst @@ -421,7 +421,7 @@ General steps for contributing a new pathway reconstruction algorithm ````, and include any other files required to build that image in the subdirectory 3. Build and push the Docker image to the - `reedcompbio `__ Docker + `reed-compbio `__ Docker organization (SPRAS maintainer required) 4. Add a new Python file ``spras/.py`` to implement the wrapper functions for ````: specify the list of diff --git a/docs/install.rst b/docs/install.rst index 116ada103..fc1454a34 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -30,12 +30,12 @@ the image from Docker Hub: .. code-block:: bash - docker pull reedcompbio/spras:latest + docker pull ghcr.io/reed-compbio/spras:latest If you want to pull a specific version of spras, use the version for the image tag name. For example, to get spras v0.2.0: .. code-block:: bash - docker pull reedcompbio/spras:0.2.0 + docker pull ghcr.io/reed-compbio/spras:0.2.0 .. _Download and Install Conda: https://conda-forge.org/download/ \ No newline at end of file diff --git a/spras/config/config.py b/spras/config/config.py index 605faecf4..07a15fdac 100644 --- a/spras/config/config.py +++ b/spras/config/config.py @@ -27,7 +27,7 @@ config = None -DEFAULT_CONTAINER_PREFIX = "docker.io/reedcompbio" +DEFAULT_CONTAINER_PREFIX = "ghcr.io/reed-compbio" # This will get called in the Snakefile, instantiating the singleton with the raw config def init_global(config_dict): @@ -67,7 +67,7 @@ def __init__(self, raw_config: dict[str, Any]): self.out_dir = parsed_raw_config.reconstruction_settings.locations.reconstruction_dir # Container framework used by PRMs. Valid options are "docker", "dsub", and "singularity" self.container_framework = None - # The container prefix (host and organization) to use for images. Default is "docker.io/reedcompbio" + # The container prefix (host and organization) to use for images. Default is "ghcr.io/reed-compbio" self.container_prefix: str = DEFAULT_CONTAINER_PREFIX # A Boolean specifying whether to unpack singularity containers. Default is False self.unpack_singularity = False diff --git a/test/analysis/input/config.yaml b/test/analysis/input/config.yaml index abde6f979..35c983a8e 100644 --- a/test/analysis/input/config.yaml +++ b/test/analysis/input/config.yaml @@ -17,10 +17,10 @@ unpack_singularity: false # Note that this assumes container names are consistent across registries, and that the # registry being passed doesn't require authentication for pull actions container_registry: - base_url: docker.io + base_url: ghcr.io # The owner or project of the registry - # For example, "reedcompbio" if the image is available as docker.io/reedcompbio/allpairs - owner: reedcompbio + # For example, "reed-compbio" if the image is available as ghcr.io/reed-compbio/allpairs + owner: reed-compbio algorithms: - name: "pathlinker" diff --git a/test/analysis/input/egfr.yaml b/test/analysis/input/egfr.yaml index da4560df9..69b2ad7b9 100644 --- a/test/analysis/input/egfr.yaml +++ b/test/analysis/input/egfr.yaml @@ -17,10 +17,10 @@ unpack_singularity: false # Note that this assumes container names are consistent across registries, and that the # registry being passed doesn't require authentication for pull actions container_registry: - base_url: docker.io + base_url: ghcr.io # The owner or project of the registry - # For example, "reedcompbio" if the image is available as docker.io/reedcompbio/allpairs - owner: reedcompbio + # For example, "reed-compbio" if the image is available as ghcr.io/reed-compbio/allpairs + owner: reed-compbio algorithms: - name: pathlinker diff --git a/test/generate-inputs/inputs/test_config.yaml b/test/generate-inputs/inputs/test_config.yaml index ed59497b1..607407d4c 100644 --- a/test/generate-inputs/inputs/test_config.yaml +++ b/test/generate-inputs/inputs/test_config.yaml @@ -2,8 +2,8 @@ hash_length: 7 container_framework: docker unpack_singularity: false container_registry: - base_url: docker.io - owner: reedcompbio + base_url: ghcr.io + owner: reed-compbio algorithms: - name: "pathlinker" diff --git a/test/test_config.py b/test/test_config.py index 72df9e0b9..6b8696649 100644 --- a/test/test_config.py +++ b/test/test_config.py @@ -20,8 +20,8 @@ def get_test_config(): test_raw_config = { "container_framework": "singularity", "container_registry": { - "base_url": "docker.io", - "owner": "reedcompbio", + "base_url": "ghcr.io", + "owner": "reed-compbio", }, "hash_length": 7, "reconstruction_settings": { @@ -185,10 +185,10 @@ def test_config_container_framework_normalization(self): def test_config_container_registry(self): test_config = get_test_config() - test_config["container_registry"]["base_url"] = "docker.io" - test_config["container_registry"]["owner"] = "reedcompbio" + test_config["container_registry"]["base_url"] = "ghcr.io" + test_config["container_registry"]["owner"] = "reed-compbio" config.init_global(test_config) - assert (config.config.container_prefix == "docker.io/reedcompbio") + assert (config.config.container_prefix == "ghcr.io/reed-compbio") test_config["container_registry"]["base_url"] = "another.repo" test_config["container_registry"]["owner"] = "different-owner" From 6e83f15ea799baf68f5730c387ba7e06c7ae3a13 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Fri, 29 Aug 2025 19:59:05 -0700 Subject: [PATCH 12/34] docs(push): clean --- docker-wrappers/README.md | 4 ++-- docker-wrappers/push.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-wrappers/README.md b/docker-wrappers/README.md index 940e89d4e..4db3dee2b 100644 --- a/docker-wrappers/README.md +++ b/docker-wrappers/README.md @@ -8,8 +8,8 @@ For convenience, we provide a `push.py` python file which pushes a docker image that we want to support. ``` -usage: push.py [-h] --tag TAG --dir DIR -push.py: error: the following arguments are required: --tag, --dir +usage: push.py [-h] --version VERSION --dir DIR +push.py: error: the following arguments are required: --version, --dir ``` For example, using the default supported `ghcr.io` registry that SPRAS uses, we can push RWR v1: diff --git a/docker-wrappers/push.py b/docker-wrappers/push.py index 76684f410..d27d16ffe 100644 --- a/docker-wrappers/push.py +++ b/docker-wrappers/push.py @@ -28,7 +28,7 @@ def parse_arguments(): parser.add_argument("--version", type=str, required=True, help="The version (tag name) to use for the container") parser.add_argument("--org-name", type=str, help="The organization to push to", default="ghcr.io/reed-compbio/") parser.add_argument("--yes", type=bool, help="Whether to automatically agree to pushing a container", action=argparse.BooleanOptionalAction) - parser.add_argument("--relax", type=bool, help="Whether to not be strict on tag naming", action=argparse.BooleanOptionalAction) + parser.add_argument("--relax", type=bool, help="Whether to not be strict on tag naming (this requires all versions start with `v`.)", action=argparse.BooleanOptionalAction) return parser.parse_args() From 23621b2a10f2b7468c2a4e304b1d303557f10df3 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Sat, 30 Aug 2025 03:00:51 +0000 Subject: [PATCH 13/34] refactor: dockerName -> imageName --- docker-wrappers/AllPairs/metadata.json | 2 +- docker-wrappers/BowTieBuilder/metadata.json | 2 +- docker-wrappers/Cytoscape/metadata.json | 2 +- docker-wrappers/DOMINO/metadata.json | 2 +- docker-wrappers/MEO/metadata.json | 2 +- docker-wrappers/MinCostFlow/metadata.json | 2 +- docker-wrappers/OmicsIntegrator1/environment.yml | 12 ------------ docker-wrappers/OmicsIntegrator1/metadata.json | 2 +- docker-wrappers/OmicsIntegrator2/metadata.json | 2 +- docker-wrappers/PathLinker/metadata.json | 2 +- docker-wrappers/RWR/metadata.json | 2 +- docker-wrappers/SPRAS/metadata.json | 2 +- docker-wrappers/ST_RWR/metadata.json | 2 +- docker-wrappers/push.py | 2 +- 14 files changed, 13 insertions(+), 25 deletions(-) delete mode 100644 docker-wrappers/OmicsIntegrator1/environment.yml diff --git a/docker-wrappers/AllPairs/metadata.json b/docker-wrappers/AllPairs/metadata.json index 01c8b0b3e..860ebdc5a 100644 --- a/docker-wrappers/AllPairs/metadata.json +++ b/docker-wrappers/AllPairs/metadata.json @@ -1,4 +1,4 @@ { - "dockerName": "allpairs", + "imageName": "allpairs", "architectures": ["linux/arm64", "linux/amd64"] } diff --git a/docker-wrappers/BowTieBuilder/metadata.json b/docker-wrappers/BowTieBuilder/metadata.json index ef3177c80..9643780e2 100644 --- a/docker-wrappers/BowTieBuilder/metadata.json +++ b/docker-wrappers/BowTieBuilder/metadata.json @@ -1,4 +1,4 @@ { - "dockerName": "bowtiebuilder", + "imageName": "bowtiebuilder", "architectures": ["linux/arm64", "linux/amd64"] } diff --git a/docker-wrappers/Cytoscape/metadata.json b/docker-wrappers/Cytoscape/metadata.json index cc78caa46..908245564 100644 --- a/docker-wrappers/Cytoscape/metadata.json +++ b/docker-wrappers/Cytoscape/metadata.json @@ -1,4 +1,4 @@ { - "dockerName": "py4cytoscape", + "imageName": "py4cytoscape", "architectures": ["linux/arm64", "linux/amd64"] } diff --git a/docker-wrappers/DOMINO/metadata.json b/docker-wrappers/DOMINO/metadata.json index 34a5109af..4f2550474 100644 --- a/docker-wrappers/DOMINO/metadata.json +++ b/docker-wrappers/DOMINO/metadata.json @@ -1,4 +1,4 @@ { - "dockerName": "domino", + "imageName": "domino", "architectures": ["linux/amd64"] } diff --git a/docker-wrappers/MEO/metadata.json b/docker-wrappers/MEO/metadata.json index 71ad2925b..9f9466c04 100644 --- a/docker-wrappers/MEO/metadata.json +++ b/docker-wrappers/MEO/metadata.json @@ -1,4 +1,4 @@ { - "dockerName": "meo", + "imageName": "meo", "architectures": ["linux/arm64", "linux/amd64"] } diff --git a/docker-wrappers/MinCostFlow/metadata.json b/docker-wrappers/MinCostFlow/metadata.json index a8b1803ff..879d13a0f 100644 --- a/docker-wrappers/MinCostFlow/metadata.json +++ b/docker-wrappers/MinCostFlow/metadata.json @@ -1,4 +1,4 @@ { - "dockerName": "mincostflow", + "imageName": "mincostflow", "architectures": ["linux/arm64", "linux/amd64"] } diff --git a/docker-wrappers/OmicsIntegrator1/environment.yml b/docker-wrappers/OmicsIntegrator1/environment.yml deleted file mode 100644 index 74a4c035a..000000000 --- a/docker-wrappers/OmicsIntegrator1/environment.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: oi1 -dependencies: - - matplotlib=2.2 - - networkx=1.11 - - numpy=1.13 - - pip=19.3 - - python=2.7 - - scipy=0.19 - - setuptools=44.0 - - wheel=0.36 - - pip: - - pytest==2.9 diff --git a/docker-wrappers/OmicsIntegrator1/metadata.json b/docker-wrappers/OmicsIntegrator1/metadata.json index d2a93fca8..5118e928d 100644 --- a/docker-wrappers/OmicsIntegrator1/metadata.json +++ b/docker-wrappers/OmicsIntegrator1/metadata.json @@ -1,4 +1,4 @@ { - "dockerName": "omics-integrator-1", + "imageName": "omics-integrator-1", "architectures": ["linux/amd64"] } diff --git a/docker-wrappers/OmicsIntegrator2/metadata.json b/docker-wrappers/OmicsIntegrator2/metadata.json index d82fdb812..2cdaf03d4 100644 --- a/docker-wrappers/OmicsIntegrator2/metadata.json +++ b/docker-wrappers/OmicsIntegrator2/metadata.json @@ -1,4 +1,4 @@ { - "dockerName": "omics-integrator-2", + "imageName": "omics-integrator-2", "architectures": ["linux/amd64"] } diff --git a/docker-wrappers/PathLinker/metadata.json b/docker-wrappers/PathLinker/metadata.json index ca939a90e..26f3db0ae 100644 --- a/docker-wrappers/PathLinker/metadata.json +++ b/docker-wrappers/PathLinker/metadata.json @@ -1,4 +1,4 @@ { - "dockerName": "pathlinker", + "imageName": "pathlinker", "architectures": ["linux/arm64", "linux/amd64"] } diff --git a/docker-wrappers/RWR/metadata.json b/docker-wrappers/RWR/metadata.json index bc768cb83..196867c60 100644 --- a/docker-wrappers/RWR/metadata.json +++ b/docker-wrappers/RWR/metadata.json @@ -1,4 +1,4 @@ { - "dockerName": "rwr", + "imageName": "rwr", "architectures": ["linux/arm64", "linux/amd64"] } diff --git a/docker-wrappers/SPRAS/metadata.json b/docker-wrappers/SPRAS/metadata.json index 20411b2fd..9bbbaf6e9 100644 --- a/docker-wrappers/SPRAS/metadata.json +++ b/docker-wrappers/SPRAS/metadata.json @@ -1,5 +1,5 @@ { - "dockerName": "spras", + "imageName": "spras", "architectures": ["linux/arm64", "linux/amd64"], "cwd": "../../" } diff --git a/docker-wrappers/ST_RWR/metadata.json b/docker-wrappers/ST_RWR/metadata.json index 9f04060fd..66ac0f212 100644 --- a/docker-wrappers/ST_RWR/metadata.json +++ b/docker-wrappers/ST_RWR/metadata.json @@ -1,4 +1,4 @@ { - "dockerName": "st-rwr", + "imageName": "st-rwr", "architectures": ["linux/arm64", "linux/amd64"] } diff --git a/docker-wrappers/push.py b/docker-wrappers/push.py index d27d16ffe..c72bd27c6 100644 --- a/docker-wrappers/push.py +++ b/docker-wrappers/push.py @@ -51,7 +51,7 @@ def main(): metadata_path = Path(dir_path, args.dir, "metadata.json") metadata = json.loads(metadata_path.read_text()) - name = metadata['dockerName'] + name = metadata['imageName'] architectures = metadata['architectures'] cwd = str(Path(dir_path, args.dir, metadata['cwd']) if 'cwd' in metadata else Path(dir_path, args.dir)) tag = args.org_name + name + ":" + args.version From fa66c4296ee89b677cbfd0f041bd8599ee2c26bf Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Sat, 30 Aug 2025 03:12:29 +0000 Subject: [PATCH 14/34] chore: push responsenet to ghcr, add ghcr links --- docker-wrappers/AllPairs/README.md | 2 +- docker-wrappers/BowTieBuilder/README.md | 2 +- docker-wrappers/Cytoscape/README.md | 2 +- docker-wrappers/DOMINO/README.md | 2 +- docker-wrappers/MEO/README.md | 2 +- docker-wrappers/MinCostFlow/README.md | 2 +- docker-wrappers/OmicsIntegrator1/README.md | 2 +- docker-wrappers/OmicsIntegrator2/README.md | 2 +- docker-wrappers/PathLinker/README.md | 2 +- docker-wrappers/RWR/README.md | 2 +- docker-wrappers/ResponseNet/README.md | 2 +- docker-wrappers/ResponseNet/metadata.json | 4 ++++ docker-wrappers/ST_RWR/README.md | 2 +- 13 files changed, 16 insertions(+), 12 deletions(-) create mode 100644 docker-wrappers/ResponseNet/metadata.json diff --git a/docker-wrappers/AllPairs/README.md b/docker-wrappers/AllPairs/README.md index 3266fbe12..d111c9056 100644 --- a/docker-wrappers/AllPairs/README.md +++ b/docker-wrappers/AllPairs/README.md @@ -1,6 +1,6 @@ # All Pairs Shortest Paths Docker image -A Docker image for All Pairs Shortest Paths that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/allpairs). +A Docker image for All Pairs Shortest Paths that is available on the [GitHub Container Registry](https://github.com/orgs/Reed-CompBio/packages/container/package/allpairs). This algorithm was implemented by the SPRAS team and relies on the NetworkX [`shortest_path`](https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.shortest_paths.generic.shortest_path.html) function. To create the Docker image run: diff --git a/docker-wrappers/BowTieBuilder/README.md b/docker-wrappers/BowTieBuilder/README.md index b0cf52dbf..e4d540e5e 100644 --- a/docker-wrappers/BowTieBuilder/README.md +++ b/docker-wrappers/BowTieBuilder/README.md @@ -1,6 +1,6 @@ # BowTieBuilder Docker image -A Docker image for [BowTieBuilder](https://github.com/Reed-CompBio/BowTieBuilder-Algorithm) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/bowtiebuilder). +A Docker image for [BowTieBuilder](https://github.com/Reed-CompBio/BowTieBuilder-Algorithm) that is available on the [GitHub Container Registry](https://github.com/orgs/Reed-CompBio/packages/container/package/bowtiebuilder). To create the Docker image run: ``` diff --git a/docker-wrappers/Cytoscape/README.md b/docker-wrappers/Cytoscape/README.md index d48c72ef9..e54fe7f99 100644 --- a/docker-wrappers/Cytoscape/README.md +++ b/docker-wrappers/Cytoscape/README.md @@ -1,6 +1,6 @@ # Cytoscape image -A Docker image for [Cytoscape](https://cytoscape.org/) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/py4cytoscape). +A Docker image for [Cytoscape](https://cytoscape.org/) that is available on the [GitHub Container Registry](https://github.com/orgs/Reed-CompBio/packages/container/package/py4cytoscape). It was originally derived from the [`docker-cytoscape-desktop/py4cytoscape`](https://github.com/cytoscape/docker-cytoscape-desktop/blob/173ab46b4b5e5c148113ad0c9960a6af3fc50432/py4cytoscape/Dockerfile) image. Thank you to Scooter Morris for help debugging problems running Cytoscape in Singularity. diff --git a/docker-wrappers/DOMINO/README.md b/docker-wrappers/DOMINO/README.md index e7704a5df..4ed4c9703 100644 --- a/docker-wrappers/DOMINO/README.md +++ b/docker-wrappers/DOMINO/README.md @@ -1,6 +1,6 @@ # DOMINO Docker image -A Docker image for [DOMINO](https://github.com/Shamir-Lab/DOMINO) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/domino). +A Docker image for [DOMINO](https://github.com/Shamir-Lab/DOMINO) that is available on the [GitHub Container Registry](https://github.com/orgs/Reed-CompBio/packages/container/package/domino). DOMINO outputs multiple active modules, which SPRAS combines into a single pathway. It is [non-deterministic](https://github.com/Shamir-Lab/DOMINO/issues/5) and cannot be made deterministic with a seed. diff --git a/docker-wrappers/MEO/README.md b/docker-wrappers/MEO/README.md index d6155e86c..d04929eb1 100644 --- a/docker-wrappers/MEO/README.md +++ b/docker-wrappers/MEO/README.md @@ -1,6 +1,6 @@ # Maximum Edge Orientation Docker image -A Docker image for [Maximum Edge Orientation](https://github.com/agitter/meo/) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/meo). +A Docker image for [Maximum Edge Orientation](https://github.com/agitter/meo/) that is available on the [GitHub Container Registry](https://github.com/orgs/Reed-CompBio/packages/container/package/meo). Only supports the Random orientation algorithm, not MINSAT or MAXCSP. ## Building the Docker image diff --git a/docker-wrappers/MinCostFlow/README.md b/docker-wrappers/MinCostFlow/README.md index 0fc16cc76..8757f903a 100644 --- a/docker-wrappers/MinCostFlow/README.md +++ b/docker-wrappers/MinCostFlow/README.md @@ -1,6 +1,6 @@ # MinCostFlow Docker image -A Docker image for [MinCostFlow](https://github.com/gitter-lab/min-cost-flow) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/mincostflow). +A Docker image for [MinCostFlow](https://github.com/gitter-lab/min-cost-flow) that is available on the [GitHub Container Registry](https://github.com/orgs/Reed-CompBio/packages/container/package/mincostflow). To create the Docker image run: ``` diff --git a/docker-wrappers/OmicsIntegrator1/README.md b/docker-wrappers/OmicsIntegrator1/README.md index c36b896dc..ea016a4d2 100644 --- a/docker-wrappers/OmicsIntegrator1/README.md +++ b/docker-wrappers/OmicsIntegrator1/README.md @@ -1,6 +1,6 @@ # Omics Integrator 1 Docker image -A Docker image for [Omics Integrator](https://github.com/fraenkel-lab/OmicsIntegrator) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/omics-integrator-1). +A Docker image for [Omics Integrator](https://github.com/fraenkel-lab/OmicsIntegrator) that is available on the [GitHub Container Registry](https://github.com/orgs/Reed-CompBio/packages/container/package/omics-integrator-1). ## Activating conda inside a Docker container diff --git a/docker-wrappers/OmicsIntegrator2/README.md b/docker-wrappers/OmicsIntegrator2/README.md index 8ac825aaf..eda0b69d8 100644 --- a/docker-wrappers/OmicsIntegrator2/README.md +++ b/docker-wrappers/OmicsIntegrator2/README.md @@ -1,6 +1,6 @@ # Omics Integrator 2 Docker image -A Docker image for [Omics Integrator 2](https://github.com/fraenkel-lab/OmicsIntegrator2) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/omics-integrator-2). +A Docker image for [Omics Integrator 2](https://github.com/fraenkel-lab/OmicsIntegrator2) that is available on the [GitHub Container Registry](https://github.com/orgs/Reed-CompBio/packages/container/package/omics-integrator-2). ## Building the Docker image diff --git a/docker-wrappers/PathLinker/README.md b/docker-wrappers/PathLinker/README.md index 61dfe89c8..3aff459ae 100644 --- a/docker-wrappers/PathLinker/README.md +++ b/docker-wrappers/PathLinker/README.md @@ -1,6 +1,6 @@ # PathLinker Docker image -A Docker image for [PathLinker](https://github.com/Murali-group/PathLinker) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/pathlinker). +A Docker image for [PathLinker](https://github.com/Murali-group/PathLinker) that is available on the [GitHub Container Registry](https://github.com/orgs/Reed-CompBio/packages/container/package/pathlinker). To create the Docker image run: ``` diff --git a/docker-wrappers/RWR/README.md b/docker-wrappers/RWR/README.md index 05bcfd51c..625d52e42 100644 --- a/docker-wrappers/RWR/README.md +++ b/docker-wrappers/RWR/README.md @@ -1,6 +1,6 @@ # Source-Targets Random Walk with Restarts -A Docker image for [RWR](https://github.com/Reed-CompBio/rwr) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/rwr). +A Docker image for [RWR](https://github.com/Reed-CompBio/rwr) that is available on the [GitHub Container Registry](https://github.com/orgs/Reed-CompBio/packages/container/package/rwr). ## Notes The random walk with restarts algorithm requires a directed input network. However, the algorithm in its current form will accept an undirected input network and interpret it as a directed network. The resulting output from an undirected network does not accurately represent directionality. diff --git a/docker-wrappers/ResponseNet/README.md b/docker-wrappers/ResponseNet/README.md index 1a2222e96..e0b46e61e 100644 --- a/docker-wrappers/ResponseNet/README.md +++ b/docker-wrappers/ResponseNet/README.md @@ -1,3 +1,3 @@ # ResponseNet Docker Image -A Docker image for [ResponseNet](https://github.com/Reed-CompBio/ResponseNet) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/responsenet). +A Docker image for [ResponseNet](https://github.com/Reed-CompBio/ResponseNet) that is available on the [GitHub Container Registry](https://github.com/orgs/Reed-CompBio/packages/container/package/responsenet). diff --git a/docker-wrappers/ResponseNet/metadata.json b/docker-wrappers/ResponseNet/metadata.json new file mode 100644 index 000000000..f45aa6931 --- /dev/null +++ b/docker-wrappers/ResponseNet/metadata.json @@ -0,0 +1,4 @@ +{ + "imageName": "responsenet", + "architectures": ["linux/arm64", "linux/amd64"] +} diff --git a/docker-wrappers/ST_RWR/README.md b/docker-wrappers/ST_RWR/README.md index 7a9b7fa99..0e777a317 100644 --- a/docker-wrappers/ST_RWR/README.md +++ b/docker-wrappers/ST_RWR/README.md @@ -1,6 +1,6 @@ # Source-Targets Random Walk with Restarts -A Docker image for [ST-RWR](https://github.com/Reed-CompBio/rwr) that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/st_rwr). +A Docker image for [ST-RWR](https://github.com/Reed-CompBio/rwr) that is available on the [GitHub Container Registry](https://github.com/orgs/Reed-CompBio/packages/container/package/st_rwr). ## Notes The random walk with restarts algorithm requires a directed input network. However, the algorithm in its current form will accept an undirected input network and interpret it as a directed network. The resulting output from an undirected network does not accurately represent directionality. From 2950a44e7a9cbb5f3f3f40a321816ce09e445662 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Sat, 30 Aug 2025 03:15:19 +0000 Subject: [PATCH 15/34] chore: label all associated containers --- docker-wrappers/AllPairs/Dockerfile | 1 + docker-wrappers/BowTieBuilder/Dockerfile | 1 + docker-wrappers/Cytoscape/Dockerfile | 1 + docker-wrappers/DOMINO/Dockerfile | 1 + docker-wrappers/MEO/Dockerfile | 1 + docker-wrappers/MinCostFlow/Dockerfile | 1 + docker-wrappers/OmicsIntegrator1/Dockerfile | 1 + docker-wrappers/OmicsIntegrator2/Dockerfile | 1 + docker-wrappers/PathLinker/Dockerfile | 1 + docker-wrappers/RWR/Dockerfile | 1 + docker-wrappers/ResponseNet/Dockerfile | 1 + docker-wrappers/SPRAS/Dockerfile | 1 + docker-wrappers/ST_RWR/Dockerfile | 1 + 13 files changed, 13 insertions(+) diff --git a/docker-wrappers/AllPairs/Dockerfile b/docker-wrappers/AllPairs/Dockerfile index 332915d17..f1c335cdd 100644 --- a/docker-wrappers/AllPairs/Dockerfile +++ b/docker-wrappers/AllPairs/Dockerfile @@ -1,5 +1,6 @@ # AllPairs wrapper FROM python:3.12-alpine3.21 +LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras # bash is required for dsub in the All of Us cloud environment RUN apk add --no-cache bash diff --git a/docker-wrappers/BowTieBuilder/Dockerfile b/docker-wrappers/BowTieBuilder/Dockerfile index 750832c0d..7680f12ec 100644 --- a/docker-wrappers/BowTieBuilder/Dockerfile +++ b/docker-wrappers/BowTieBuilder/Dockerfile @@ -1,4 +1,5 @@ FROM python:3.8-bullseye +LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras WORKDIR /btb RUN wget https://raw.githubusercontent.com/Reed-CompBio/BowTieBuilder-Algorithm/dd8519cd8a8397c0e0724106f498b6002d3f7be2/btb.py diff --git a/docker-wrappers/Cytoscape/Dockerfile b/docker-wrappers/Cytoscape/Dockerfile index 308373474..57c8d2815 100644 --- a/docker-wrappers/Cytoscape/Dockerfile +++ b/docker-wrappers/Cytoscape/Dockerfile @@ -2,6 +2,7 @@ # https://github.com/cytoscape/docker-cytoscape-desktop/blob/173ab46b4b5e5c148113ad0c9960a6af3fc50432/py4cytoscape/Dockerfile # by Kozo Nishida FROM python:3.9.13 +LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras # Versions ENV CYTOSCAPE_VERSION=3.9.1 diff --git a/docker-wrappers/DOMINO/Dockerfile b/docker-wrappers/DOMINO/Dockerfile index 9ab193ac4..5bfba21a1 100644 --- a/docker-wrappers/DOMINO/Dockerfile +++ b/docker-wrappers/DOMINO/Dockerfile @@ -1,6 +1,7 @@ # DOMINO wrapper # https://github.com/Shamir-Lab/DOMINO FROM python:3.7 +LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras RUN pip install domino-python==0.1.1 diff --git a/docker-wrappers/MEO/Dockerfile b/docker-wrappers/MEO/Dockerfile index 164a42ae9..9903c118c 100644 --- a/docker-wrappers/MEO/Dockerfile +++ b/docker-wrappers/MEO/Dockerfile @@ -1,6 +1,7 @@ # Maximum Edge Orientation wrapper # https://github.com/agitter/meo/ FROM openjdk:8 +LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras WORKDIR /meo RUN export MEO_TAG=v1.1.0 && \ diff --git a/docker-wrappers/MinCostFlow/Dockerfile b/docker-wrappers/MinCostFlow/Dockerfile index 9da359a62..c6f78f9fd 100644 --- a/docker-wrappers/MinCostFlow/Dockerfile +++ b/docker-wrappers/MinCostFlow/Dockerfile @@ -1,5 +1,6 @@ #uses ubuntu as the base FROM python:3.10.7 +LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras WORKDIR /MinCostFlow diff --git a/docker-wrappers/OmicsIntegrator1/Dockerfile b/docker-wrappers/OmicsIntegrator1/Dockerfile index 2cfaf1b8f..4fa8eb4b4 100644 --- a/docker-wrappers/OmicsIntegrator1/Dockerfile +++ b/docker-wrappers/OmicsIntegrator1/Dockerfile @@ -2,6 +2,7 @@ # https://github.com/fraenkel-lab/OmicsIntegrator # This version does not use conda FROM python:2.7.18 +LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras # Need to install msgsteiner-1.3 and dependencies RUN apt-get -qq update && \ diff --git a/docker-wrappers/OmicsIntegrator2/Dockerfile b/docker-wrappers/OmicsIntegrator2/Dockerfile index e0df2d2db..5f6d13f12 100644 --- a/docker-wrappers/OmicsIntegrator2/Dockerfile +++ b/docker-wrappers/OmicsIntegrator2/Dockerfile @@ -1,6 +1,7 @@ # Omics Integrator 2 wrapper # https://github.com/fraenkel-lab/OmicsIntegrator2 FROM continuumio/miniconda3:4.9.2 +LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras COPY environment.yml . RUN conda env update --name base --file environment.yml --prune diff --git a/docker-wrappers/PathLinker/Dockerfile b/docker-wrappers/PathLinker/Dockerfile index 29950a059..814dbf307 100644 --- a/docker-wrappers/PathLinker/Dockerfile +++ b/docker-wrappers/PathLinker/Dockerfile @@ -1,6 +1,7 @@ # PathLinker wrapper # https://github.com/Murali-group/PathLinker FROM python:3.5.10-alpine +LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras # gettext is required for the envsubst command # See https://github.com/haskell/cabal/issues/6126 regarding wget diff --git a/docker-wrappers/RWR/Dockerfile b/docker-wrappers/RWR/Dockerfile index d4772a7aa..a67bbec62 100644 --- a/docker-wrappers/RWR/Dockerfile +++ b/docker-wrappers/RWR/Dockerfile @@ -1,4 +1,5 @@ FROM python:3.11.5 +LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras # Required for PageRank to run RUN pip install networkx==2.8.8 numpy==1.26.4 scipy==1.15.2 diff --git a/docker-wrappers/ResponseNet/Dockerfile b/docker-wrappers/ResponseNet/Dockerfile index ea7087590..87e92da67 100644 --- a/docker-wrappers/ResponseNet/Dockerfile +++ b/docker-wrappers/ResponseNet/Dockerfile @@ -1,5 +1,6 @@ #uses ubuntu as the base FROM python:3.10.7 +LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras WORKDIR /ResponseNet diff --git a/docker-wrappers/SPRAS/Dockerfile b/docker-wrappers/SPRAS/Dockerfile index 3d69943cc..ad3513df9 100644 --- a/docker-wrappers/SPRAS/Dockerfile +++ b/docker-wrappers/SPRAS/Dockerfile @@ -1,4 +1,5 @@ FROM almalinux:9 +LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras # gcc/g++ are required for building several of the packages if you're using apple silicon RUN dnf update -y && \ diff --git a/docker-wrappers/ST_RWR/Dockerfile b/docker-wrappers/ST_RWR/Dockerfile index cad7336d2..183570e09 100644 --- a/docker-wrappers/ST_RWR/Dockerfile +++ b/docker-wrappers/ST_RWR/Dockerfile @@ -1,4 +1,5 @@ FROM python:3.11.5 +LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras # Required for PageRank to run RUN pip install networkx==2.8.8 numpy==1.26.4 scipy==1.15.2 From cbb19be465e29b88f08f0fcc509629d7078492a9 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Sat, 30 Aug 2025 03:19:53 +0000 Subject: [PATCH 16/34] chore(docker-wrappers): don't use legacy syntax --- docker-wrappers/AllPairs/Dockerfile | 2 +- docker-wrappers/BowTieBuilder/Dockerfile | 2 +- docker-wrappers/Cytoscape/Dockerfile | 2 +- docker-wrappers/DOMINO/Dockerfile | 2 +- docker-wrappers/MEO/Dockerfile | 2 +- docker-wrappers/MinCostFlow/Dockerfile | 2 +- docker-wrappers/OmicsIntegrator1/Dockerfile | 2 +- docker-wrappers/OmicsIntegrator2/Dockerfile | 2 +- docker-wrappers/PathLinker/Dockerfile | 2 +- docker-wrappers/RWR/Dockerfile | 2 +- docker-wrappers/ResponseNet/Dockerfile | 2 +- docker-wrappers/SPRAS/Dockerfile | 2 +- docker-wrappers/ST_RWR/Dockerfile | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docker-wrappers/AllPairs/Dockerfile b/docker-wrappers/AllPairs/Dockerfile index f1c335cdd..738b56158 100644 --- a/docker-wrappers/AllPairs/Dockerfile +++ b/docker-wrappers/AllPairs/Dockerfile @@ -1,6 +1,6 @@ # AllPairs wrapper FROM python:3.12-alpine3.21 -LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras +LABEL org.opencontainers.image.source=https://github.com/Reed-CompBio/spras # bash is required for dsub in the All of Us cloud environment RUN apk add --no-cache bash diff --git a/docker-wrappers/BowTieBuilder/Dockerfile b/docker-wrappers/BowTieBuilder/Dockerfile index 7680f12ec..1aa095a51 100644 --- a/docker-wrappers/BowTieBuilder/Dockerfile +++ b/docker-wrappers/BowTieBuilder/Dockerfile @@ -1,5 +1,5 @@ FROM python:3.8-bullseye -LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras +LABEL org.opencontainers.image.source=https://github.com/Reed-CompBio/spras WORKDIR /btb RUN wget https://raw.githubusercontent.com/Reed-CompBio/BowTieBuilder-Algorithm/dd8519cd8a8397c0e0724106f498b6002d3f7be2/btb.py diff --git a/docker-wrappers/Cytoscape/Dockerfile b/docker-wrappers/Cytoscape/Dockerfile index 57c8d2815..e7a665cdf 100644 --- a/docker-wrappers/Cytoscape/Dockerfile +++ b/docker-wrappers/Cytoscape/Dockerfile @@ -2,7 +2,7 @@ # https://github.com/cytoscape/docker-cytoscape-desktop/blob/173ab46b4b5e5c148113ad0c9960a6af3fc50432/py4cytoscape/Dockerfile # by Kozo Nishida FROM python:3.9.13 -LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras +LABEL org.opencontainers.image.source=https://github.com/Reed-CompBio/spras # Versions ENV CYTOSCAPE_VERSION=3.9.1 diff --git a/docker-wrappers/DOMINO/Dockerfile b/docker-wrappers/DOMINO/Dockerfile index 5bfba21a1..75e905c37 100644 --- a/docker-wrappers/DOMINO/Dockerfile +++ b/docker-wrappers/DOMINO/Dockerfile @@ -1,7 +1,7 @@ # DOMINO wrapper # https://github.com/Shamir-Lab/DOMINO FROM python:3.7 -LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras +LABEL org.opencontainers.image.source=https://github.com/Reed-CompBio/spras RUN pip install domino-python==0.1.1 diff --git a/docker-wrappers/MEO/Dockerfile b/docker-wrappers/MEO/Dockerfile index 9903c118c..f58a1ae8e 100644 --- a/docker-wrappers/MEO/Dockerfile +++ b/docker-wrappers/MEO/Dockerfile @@ -1,7 +1,7 @@ # Maximum Edge Orientation wrapper # https://github.com/agitter/meo/ FROM openjdk:8 -LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras +LABEL org.opencontainers.image.source=https://github.com/Reed-CompBio/spras WORKDIR /meo RUN export MEO_TAG=v1.1.0 && \ diff --git a/docker-wrappers/MinCostFlow/Dockerfile b/docker-wrappers/MinCostFlow/Dockerfile index c6f78f9fd..20e80bfde 100644 --- a/docker-wrappers/MinCostFlow/Dockerfile +++ b/docker-wrappers/MinCostFlow/Dockerfile @@ -1,6 +1,6 @@ #uses ubuntu as the base FROM python:3.10.7 -LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras +LABEL org.opencontainers.image.source=https://github.com/Reed-CompBio/spras WORKDIR /MinCostFlow diff --git a/docker-wrappers/OmicsIntegrator1/Dockerfile b/docker-wrappers/OmicsIntegrator1/Dockerfile index 4fa8eb4b4..1f05b9393 100644 --- a/docker-wrappers/OmicsIntegrator1/Dockerfile +++ b/docker-wrappers/OmicsIntegrator1/Dockerfile @@ -2,7 +2,7 @@ # https://github.com/fraenkel-lab/OmicsIntegrator # This version does not use conda FROM python:2.7.18 -LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras +LABEL org.opencontainers.image.source=https://github.com/Reed-CompBio/spras # Need to install msgsteiner-1.3 and dependencies RUN apt-get -qq update && \ diff --git a/docker-wrappers/OmicsIntegrator2/Dockerfile b/docker-wrappers/OmicsIntegrator2/Dockerfile index 5f6d13f12..617fbcda8 100644 --- a/docker-wrappers/OmicsIntegrator2/Dockerfile +++ b/docker-wrappers/OmicsIntegrator2/Dockerfile @@ -1,7 +1,7 @@ # Omics Integrator 2 wrapper # https://github.com/fraenkel-lab/OmicsIntegrator2 FROM continuumio/miniconda3:4.9.2 -LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras +LABEL org.opencontainers.image.source=https://github.com/Reed-CompBio/spras COPY environment.yml . RUN conda env update --name base --file environment.yml --prune diff --git a/docker-wrappers/PathLinker/Dockerfile b/docker-wrappers/PathLinker/Dockerfile index 814dbf307..272d389ba 100644 --- a/docker-wrappers/PathLinker/Dockerfile +++ b/docker-wrappers/PathLinker/Dockerfile @@ -1,7 +1,7 @@ # PathLinker wrapper # https://github.com/Murali-group/PathLinker FROM python:3.5.10-alpine -LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras +LABEL org.opencontainers.image.source=https://github.com/Reed-CompBio/spras # gettext is required for the envsubst command # See https://github.com/haskell/cabal/issues/6126 regarding wget diff --git a/docker-wrappers/RWR/Dockerfile b/docker-wrappers/RWR/Dockerfile index a67bbec62..206eb0c0c 100644 --- a/docker-wrappers/RWR/Dockerfile +++ b/docker-wrappers/RWR/Dockerfile @@ -1,5 +1,5 @@ FROM python:3.11.5 -LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras +LABEL org.opencontainers.image.source=https://github.com/Reed-CompBio/spras # Required for PageRank to run RUN pip install networkx==2.8.8 numpy==1.26.4 scipy==1.15.2 diff --git a/docker-wrappers/ResponseNet/Dockerfile b/docker-wrappers/ResponseNet/Dockerfile index 87e92da67..a612f8780 100644 --- a/docker-wrappers/ResponseNet/Dockerfile +++ b/docker-wrappers/ResponseNet/Dockerfile @@ -1,6 +1,6 @@ #uses ubuntu as the base FROM python:3.10.7 -LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras +LABEL org.opencontainers.image.source=https://github.com/Reed-CompBio/spras WORKDIR /ResponseNet diff --git a/docker-wrappers/SPRAS/Dockerfile b/docker-wrappers/SPRAS/Dockerfile index ad3513df9..b12b25ef4 100644 --- a/docker-wrappers/SPRAS/Dockerfile +++ b/docker-wrappers/SPRAS/Dockerfile @@ -1,5 +1,5 @@ FROM almalinux:9 -LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras +LABEL org.opencontainers.image.source=https://github.com/Reed-CompBio/spras # gcc/g++ are required for building several of the packages if you're using apple silicon RUN dnf update -y && \ diff --git a/docker-wrappers/ST_RWR/Dockerfile b/docker-wrappers/ST_RWR/Dockerfile index 183570e09..c8dd3df23 100644 --- a/docker-wrappers/ST_RWR/Dockerfile +++ b/docker-wrappers/ST_RWR/Dockerfile @@ -1,5 +1,5 @@ FROM python:3.11.5 -LABEL org.opencontainers.image.source https://github.com/Reed-CompBio/spras +LABEL org.opencontainers.image.source=https://github.com/Reed-CompBio/spras # Required for PageRank to run RUN pip install networkx==2.8.8 numpy==1.26.4 scipy==1.15.2 From 573240c1dc61bd1482bd426f8e6dd4132b93e434 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Sat, 30 Aug 2025 03:44:56 +0000 Subject: [PATCH 17/34] chore: use v1 for rn --- docker-wrappers/BowTieBuilder/README.md | 2 +- docker-wrappers/push.py | 4 +++- spras/responsenet.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docker-wrappers/BowTieBuilder/README.md b/docker-wrappers/BowTieBuilder/README.md index e4d540e5e..dc541d66b 100644 --- a/docker-wrappers/BowTieBuilder/README.md +++ b/docker-wrappers/BowTieBuilder/README.md @@ -4,7 +4,7 @@ A Docker image for [BowTieBuilder](https://github.com/Reed-CompBio/BowTieBuilder To create the Docker image run: ``` -docker build -t reed-compbio/bowtiebuilder:v2 -f Dockerfile . +docker build -t reed-compbio/bowtiebuilder:v1 -f Dockerfile . ``` from this directory. diff --git a/docker-wrappers/push.py b/docker-wrappers/push.py index c72bd27c6..723375a8e 100644 --- a/docker-wrappers/push.py +++ b/docker-wrappers/push.py @@ -67,7 +67,9 @@ def main(): raise RuntimeError("Did not confirm dialog.") push_command = construct_push_command([tag, tag_latest], args.dir, architectures) - subprocess.run(push_command, capture_output=False, cwd=cwd) + result = subprocess.run(push_command, capture_output=False, cwd=cwd) + + exit(result.returncode) if __name__ == '__main__': main() diff --git a/spras/responsenet.py b/spras/responsenet.py index 48dd269cc..0a81879a9 100644 --- a/spras/responsenet.py +++ b/spras/responsenet.py @@ -102,7 +102,7 @@ def run(sources=None, targets=None, edges=None, output_file=None, gamma=10, cont '--gamma', str(gamma)] # choosing to run in docker or singularity container - container_suffix = "responsenet:v2" + container_suffix = "responsenet:v1" # constructs a docker run call run_container_and_log('ResponseNet', From f22b05b81993a2ad524e99093c0e4d3ae7377e57 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Sat, 30 Aug 2025 05:02:09 +0000 Subject: [PATCH 18/34] no-push flag, document arch problems --- docker-wrappers/DOMINO/README.md | 1 + docker-wrappers/OmicsIntegrator2/README.md | 1 + docker-wrappers/push.py | 18 ++++++++++++++---- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/docker-wrappers/DOMINO/README.md b/docker-wrappers/DOMINO/README.md index 4ed4c9703..8bd715795 100644 --- a/docker-wrappers/DOMINO/README.md +++ b/docker-wrappers/DOMINO/README.md @@ -20,3 +20,4 @@ The `winpty` prefix is only needed on Windows. ## TODO - Resolve upstream ValueError with small inputs https://github.com/Shamir-Lab/DOMINO/issues/11 - Use cache or reuse slices files from previous runs on the same network +- Investigate why DOMINO does not build on amd64. diff --git a/docker-wrappers/OmicsIntegrator2/README.md b/docker-wrappers/OmicsIntegrator2/README.md index eda0b69d8..046317db2 100644 --- a/docker-wrappers/OmicsIntegrator2/README.md +++ b/docker-wrappers/OmicsIntegrator2/README.md @@ -30,3 +30,4 @@ The Docker wrapper can be tested with `pytest`. - Attribute https://github.com/fraenkel-lab/OmicsIntegrator2 - Modify environment to use fraenkel-lab or [PyPI](https://pypi.org/project/OmicsIntegrator/) version instead of fork - Document usage +- Use a different base image that is not `continuumio/miniconda3:4.9.2` to add arm64 support. diff --git a/docker-wrappers/push.py b/docker-wrappers/push.py index 723375a8e..2b514508a 100644 --- a/docker-wrappers/push.py +++ b/docker-wrappers/push.py @@ -12,12 +12,21 @@ # https://stackoverflow.com/a/5137509/7589775 dir_path = os.path.dirname(os.path.realpath(__file__)) -def construct_push_command(tags: list[str], dir: str, architectures: list[str]): +def construct_push_command( + tags: list[str], + dir: str, + architectures: list[str], + push: bool +): base_cmd = ["build"] for tag in tags: base_cmd.extend(["--tag", tag]) base_cmd = base_cmd + ["--file", Path(dir_path, dir, "Dockerfile"), "--platform", - ",".join(architectures), "--builder", "container", "--push", "."] + ",".join(architectures), "--builder", "container"] + if push: + base_cmd.append("--push") + base_cmd.append(".") + return COMMAND_BUILDX + base_cmd def parse_arguments(): @@ -29,6 +38,7 @@ def parse_arguments(): parser.add_argument("--org-name", type=str, help="The organization to push to", default="ghcr.io/reed-compbio/") parser.add_argument("--yes", type=bool, help="Whether to automatically agree to pushing a container", action=argparse.BooleanOptionalAction) parser.add_argument("--relax", type=bool, help="Whether to not be strict on tag naming (this requires all versions start with `v`.)", action=argparse.BooleanOptionalAction) + parser.add_argument("--nopush", type=bool, help="Enabling nopush only builds the image. This is useful for testing architecture support", action=argparse.BooleanOptionalAction) return parser.parse_args() @@ -62,11 +72,11 @@ def main(): print(f"- Specified tag: {tag}") print(f"- Latest tag: {tag_latest}") if not args.yes: - confirm = input("[y/n] Are you sure you want to push to these tags over these architectures? ") + confirm = input("[y/n] Are you sure you want to {} these tags over these architectures? ".format("build (because of --nopush)" if args.nopush else "push to")) if confirm.strip().lower() not in ('y', 'yes'): raise RuntimeError("Did not confirm dialog.") - push_command = construct_push_command([tag, tag_latest], args.dir, architectures) + push_command = construct_push_command([tag, tag_latest], args.dir, architectures, not args.nopush) result = subprocess.run(push_command, capture_output=False, cwd=cwd) exit(result.returncode) From eee5c0aa937b0762c146c961cbe0d573cd744d39 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Sat, 30 Aug 2025 05:03:06 +0000 Subject: [PATCH 19/34] docs: link to issues --- docker-wrappers/DOMINO/README.md | 2 +- docker-wrappers/OmicsIntegrator2/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-wrappers/DOMINO/README.md b/docker-wrappers/DOMINO/README.md index 8bd715795..074cf6c6a 100644 --- a/docker-wrappers/DOMINO/README.md +++ b/docker-wrappers/DOMINO/README.md @@ -20,4 +20,4 @@ The `winpty` prefix is only needed on Windows. ## TODO - Resolve upstream ValueError with small inputs https://github.com/Shamir-Lab/DOMINO/issues/11 - Use cache or reuse slices files from previous runs on the same network -- Investigate why DOMINO does not build on amd64. +- Investigate why DOMINO does not build on amd64 after https://github.com/Reed-CompBio/spras/pull/235. diff --git a/docker-wrappers/OmicsIntegrator2/README.md b/docker-wrappers/OmicsIntegrator2/README.md index 046317db2..6b2e966f8 100644 --- a/docker-wrappers/OmicsIntegrator2/README.md +++ b/docker-wrappers/OmicsIntegrator2/README.md @@ -30,4 +30,4 @@ The Docker wrapper can be tested with `pytest`. - Attribute https://github.com/fraenkel-lab/OmicsIntegrator2 - Modify environment to use fraenkel-lab or [PyPI](https://pypi.org/project/OmicsIntegrator/) version instead of fork - Document usage -- Use a different base image that is not `continuumio/miniconda3:4.9.2` to add arm64 support. +- Use a different base image that is not `continuumio/miniconda3:4.9.2` to add arm64 support (see https://github.com/Reed-CompBio/spras/issues/315). From 2594277365bbed0a342b729264981fb8b90cd40b Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Sat, 30 Aug 2025 05:25:39 +0000 Subject: [PATCH 20/34] ci: check responsenet --- .github/workflows/build-containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 65d5e20af..4b906d1b3 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -57,7 +57,7 @@ jobs: uses: "./.github/workflows/build-and-remove-template.yml" with: path: docker-wrappers/ResponseNet - container: reed-compbio/responsenet + container: ghcr.io/reed-compbio/responsenet build-and-remove-spras: uses: "./.github/workflows/build-and-remove-template.yml" with: From 43ebaee5f1885f8948e4e62c3835f7923979b959 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Fri, 29 Aug 2025 23:09:28 -0700 Subject: [PATCH 21/34] ci: add perms for r/w --- .github/workflows/push-docker.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/push-docker.yml b/.github/workflows/push-docker.yml index 0fb03397f..10f36fa70 100644 --- a/.github/workflows/push-docker.yml +++ b/.github/workflows/push-docker.yml @@ -15,6 +15,9 @@ on: jobs: push-image: runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - uses: actions/checkout@v4 - name: Login to GitHub Container Registry From 1687ba05853445003022701ac590b515fe25f855 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Sat, 30 Aug 2025 06:20:08 +0000 Subject: [PATCH 22/34] docs: mention new v1 for ghcr --- docker-wrappers/AllPairs/README.md | 4 ++-- docker-wrappers/Cytoscape/README.md | 6 +++--- docker-wrappers/OmicsIntegrator2/README.md | 4 ++-- docker-wrappers/PathLinker/README.md | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docker-wrappers/AllPairs/README.md b/docker-wrappers/AllPairs/README.md index d111c9056..c8cb1ea50 100644 --- a/docker-wrappers/AllPairs/README.md +++ b/docker-wrappers/AllPairs/README.md @@ -28,5 +28,5 @@ The Docker wrapper can be tested with `pytest -k test_ap.py` from the root of th - Samples of an input network and source/target file are located under test/AllPairs/input. ## Versions: -- v1: Initial version. Copies source file from SPRAS repository. -- v2: Add bash, which is not available in Alpine Linux. +- (docker hub) v1: Initial version. Copies source file from SPRAS repository. +- v1: Add bash, which is not available in Alpine Linux. diff --git a/docker-wrappers/Cytoscape/README.md b/docker-wrappers/Cytoscape/README.md index e54fe7f99..ab6812446 100644 --- a/docker-wrappers/Cytoscape/README.md +++ b/docker-wrappers/Cytoscape/README.md @@ -18,9 +18,9 @@ Test code is located in `test/analysis/test_cytoscape.py`. The Docker wrapper can be tested with `pytest`. ## Versions: -- v1: Use supervisord to launch Cytoscape from a Python subprocess, then connect to Cytoscape with py4cytoscape. Only loads undirected pathways. Compatible with Singularity in local testing (Apptainer version 1.2.2-1.el7) but fails in GitHub Actions. -- v2: Add support for edge direction column. -- v3: Add support for header lines in files +- (docker hub) v1: Use supervisord to launch Cytoscape from a Python subprocess, then connect to Cytoscape with py4cytoscape. Only loads undirected pathways. Compatible with Singularity in local testing (Apptainer version 1.2.2-1.el7) but fails in GitHub Actions. +- (docker hub) v2: Add support for edge direction column. +- v1: Add support for header lines in files ## TODO - Add an auth file for `xvfb-run` diff --git a/docker-wrappers/OmicsIntegrator2/README.md b/docker-wrappers/OmicsIntegrator2/README.md index 6b2e966f8..054d52b46 100644 --- a/docker-wrappers/OmicsIntegrator2/README.md +++ b/docker-wrappers/OmicsIntegrator2/README.md @@ -23,8 +23,8 @@ The `input` subdirectory contains test files `oi2-edges.txt` and `oi2-prizes.txt The Docker wrapper can be tested with `pytest`. ## Versions: -- v1: Created a named conda environment in the container and used `ENTRYPOINT` to execute commands inside that environment. Not compatible with Singularity. -- v2: Used the environment file to update the base conda environment so the `ENTRYPOINT` command was no longer needed. Compatible with Singularity. +- (docker hub) v1: Created a named conda environment in the container and used `ENTRYPOINT` to execute commands inside that environment. Not compatible with Singularity. +- v1: Used the environment file to update the base conda environment so the `ENTRYPOINT` command was no longer needed. Compatible with Singularity. ## TODO - Attribute https://github.com/fraenkel-lab/OmicsIntegrator2 diff --git a/docker-wrappers/PathLinker/README.md b/docker-wrappers/PathLinker/README.md index 3aff459ae..fec05396a 100644 --- a/docker-wrappers/PathLinker/README.md +++ b/docker-wrappers/PathLinker/README.md @@ -28,8 +28,8 @@ This will run PathLinker on the test input files and write the output files to t Windows users may need to escape the absolute paths so that `/data` becomes `//data`, etc. ## Versions: -- v1: Initial version. Copies PathLinker source files from GitHub and pip installs packages from requirements file. -- v2: Add bash, which is not available in Alpine Linux. +- (docker hub) v1: Initial version. Copies PathLinker source files from GitHub and pip installs packages from requirements file. +- v1: Add bash, which is not available in Alpine Linux. ## TODO - Attribute https://github.com/Murali-group/PathLinker From b95838a3c3c4f56b08a18f7a35c191a661d0114c Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Sat, 30 Aug 2025 06:25:57 +0000 Subject: [PATCH 23/34] ci: use ghcr on release --- .github/workflows/release.yml | 23 +++++------------------ README.md | 2 +- docs/install.rst | 2 +- 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 44e9c1495..150ff7df5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,25 +19,12 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Log in to Docker Hub + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKER_USERNAME }} - # Passwords are set up through the GitHub control panel. The docs for - # the login action are explicit about never using a real password, and - # instead setting up a DockerHub personal access token: - # https://github.com/docker/login-action?tab=readme-ov-file#docker-hub - password: ${{ secrets.DOCKER_PASSWORD }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Docker image - uses: docker/build-push-action@v6 - with: - context: ./ - file: docker-wrappers/SPRAS/Dockerfile - tags: | - reed-compbio/spras:${{ github.ref_name }} - reed-compbio/spras:latest - # Use the previous latest for the build cache, assuming they're probably - # relatively similar - cache-from: type=registry,ref=reed-compbio/spras:latest - push: true + run: python3 docker-wrappers/push.py --dir SPRAS --version ${{ github.ref_name }} --yes diff --git a/README.md b/README.md index 8b5853430..655da7235 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Large SPRAS workflows may benefit from execution with HTCondor, a scheduler/mana **Dockerized pathway reconstruction algorithms**: Pathway reconstruction algorithms are run via Docker images using the docker-py Python package. [PathLinker](https://github.com/Murali-group/PathLinker), [Omics Integrator](https://github.com/fraenkel-lab/OmicsIntegrator), [Omics Integrator 2](https://github.com/fraenkel-lab/OmicsIntegrator2), and [Maximum Edge Orientation](https://github.com/agitter/meo/) are the first supported algorithms. The files to create these Docker images are in the `docker-wrappers` subdirectory along with links to algorithms' original repositories. -The Docker images are available on [DockerHub](https://hub.docker.com/orgs/reed-compbio). +The Docker images are available on the [GitHub Container Registry](https://github.com/orgs/Reed-CompBio/packages). **Python wrapper for calling algorithms**: Wrapper functions provide an interface between the common file formats for input and output data and the algorithm-specific file formats and reconstruction commands. These wrappers are in the `spras/` subdirectory. diff --git a/docs/install.rst b/docs/install.rst index fc1454a34..0f567ab3f 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -26,7 +26,7 @@ You can also install SPRAS as a package using `pip` directly from the github rep Getting the SPRAS Docker Image ------------------------------ SPRAS also publishes a Docker image that already holds all the necessary dependencies. Assuming you have Docker installed, you can pull -the image from Docker Hub: +the image from the GitHub Container Registry: .. code-block:: bash From 6f2d6892f711c1b9e82ba1ceee42acd02bceaf68 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Sun, 31 Aug 2025 06:21:30 +0000 Subject: [PATCH 24/34] fix(oi1): custom python installation --- docker-wrappers/OmicsIntegrator1/Dockerfile | 24 ++++++++++++++++++--- docker-wrappers/OmicsIntegrator1/README.md | 23 +++----------------- docker-wrappers/README.md | 6 ++++-- docker-wrappers/push.py | 5 +++-- spras/omicsintegrator1.py | 2 +- 5 files changed, 32 insertions(+), 28 deletions(-) diff --git a/docker-wrappers/OmicsIntegrator1/Dockerfile b/docker-wrappers/OmicsIntegrator1/Dockerfile index 1f05b9393..f1ea2daea 100644 --- a/docker-wrappers/OmicsIntegrator1/Dockerfile +++ b/docker-wrappers/OmicsIntegrator1/Dockerfile @@ -1,13 +1,31 @@ # Omics Integrator 1 wrapper # https://github.com/fraenkel-lab/OmicsIntegrator # This version does not use conda -FROM python:2.7.18 +FROM debian:12.11-slim LABEL org.opencontainers.image.source=https://github.com/Reed-CompBio/spras -# Need to install msgsteiner-1.3 and dependencies -RUN apt-get -qq update && \ +# The official Python 2.7 image is too old (Debian Buster is on EOL) +# to support downloading the packages we need in the next step. +# Instead, we get it manually +# (from https://stackoverflow.com/a/70866416/7589775) +# We also avoid the deadsnakes ppa, as it has since removed +# python 2.7 from its repositories +RUN apt update -y && apt upgrade -y && \ + apt-get install -y wget build-essential checkinstall libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev && \ + cd /usr/src && \ + wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz && \ + tar xzf Python-2.7.18.tgz && \ + cd Python-2.7.18 && \ + ./configure --enable-optimizations && \ + make install + +# Need to install msgsteiner-1.3 and dependencies for OI1 +RUN apt-get update && \ apt-get install -y build-essential libx11-dev libboost-dev libboost-program-options-dev +# We also want pip +RUN python -m ensurepip --upgrade + RUN commit=0a57ede6beeef6e63b86d19898e560d62015e85d && \ wget https://github.com/fraenkel-lab/OmicsIntegrator/tarball/$commit && \ tar -zxvf $commit && \ diff --git a/docker-wrappers/OmicsIntegrator1/README.md b/docker-wrappers/OmicsIntegrator1/README.md index ea016a4d2..03bc4e950 100644 --- a/docker-wrappers/OmicsIntegrator1/README.md +++ b/docker-wrappers/OmicsIntegrator1/README.md @@ -2,13 +2,6 @@ A Docker image for [Omics Integrator](https://github.com/fraenkel-lab/OmicsIntegrator) that is available on the [GitHub Container Registry](https://github.com/orgs/Reed-CompBio/packages/container/package/omics-integrator-1). -## Activating conda inside a Docker container - -By default, an installed conda environment will not be activated inside the Docker container. -Docker does not invoke Bash as a login shell. -[This blog post](https://pythonspeed.com/articles/activate-conda-dockerfile/) provides a workaround demonstrated here in `Dockerfile` and `env.yml`. -It defines a custom ENTRYPOINT that uses `conda run` to run the command inside the conda environment. - To create the Docker image run: ``` docker build -t reed-compbio/omics-integrator-1 -f Dockerfile . @@ -29,23 +22,13 @@ The Docker wrapper can be tested with `pytest`. The Docker wrapper also can be tested by running the Omics Integrator tests interactively: ``` winpty docker run -it reed-compbio/omics-integrator-1 bash -conda activate oi1 python setup.py test -a "--msgpath=$MSGSTEINER_PATH" ``` -## No conda alternative -An alternative version of the Omics Integrator image does not use conda. -This simplifies using the same image for Docker and Singularity. -This version uses `requirements.txt` instead of `environment.yml` to specify required Python packages. -It can be built and tested in a manner similar to the conda-based image. -``` -docker build -t reed-compbio/omics-integrator-1:no-conda -f Dockerfile_no_conda . - -winpty docker run -it reed-compbio/omics-integrator-1:no-conda bash -python setup.py test -a "--msgpath=$MSGSTEINER_PATH" -``` +## Versions -This version of the image is the default used by SPRAS. +- v1: Initial OmicsIntegrator1 from the [original no-conda image](https://github.com/Reed-CompBio/spras/blob/fad9fbf782ae0bd1e0cf660b7ef2a2d61df41cf5/docker-wrappers/OmicsIntegrator1/Dockerfile_no_conda) +- v2: Updated the base image and manually installed python. ## TODO - Attribute https://github.com/fraenkel-lab/OmicsIntegrator diff --git a/docker-wrappers/README.md b/docker-wrappers/README.md index 4db3dee2b..a3886ed97 100644 --- a/docker-wrappers/README.md +++ b/docker-wrappers/README.md @@ -8,8 +8,8 @@ For convenience, we provide a `push.py` python file which pushes a docker image that we want to support. ``` -usage: push.py [-h] --version VERSION --dir DIR -push.py: error: the following arguments are required: --version, --dir +usage: push.py [-h] --dir DIR --version VERSION [--org-name ORG_NAME] [--yes | --no-yes] [--relax | --no-relax] [--nopush | --no-nopush] +push.py: error: the following arguments are required: --dir, --version ``` For example, using the default supported `ghcr.io` registry that SPRAS uses, we can push RWR v1: @@ -18,3 +18,5 @@ For example, using the default supported `ghcr.io` registry that SPRAS uses, we docker login ghcr.io -u reed-compbio python push.py --dir RWR --version v1 ``` + +You can also build the image without pushing it using `--nopush`, which will load the image into docker. diff --git a/docker-wrappers/push.py b/docker-wrappers/push.py index 2b514508a..bbbc45d08 100644 --- a/docker-wrappers/push.py +++ b/docker-wrappers/push.py @@ -23,8 +23,9 @@ def construct_push_command( base_cmd.extend(["--tag", tag]) base_cmd = base_cmd + ["--file", Path(dir_path, dir, "Dockerfile"), "--platform", ",".join(architectures), "--builder", "container"] - if push: - base_cmd.append("--push") + # --load loads an image into the docker environment, which is the normal behavior + # for docker build. + base_cmd.append("--push" if push else "--load") base_cmd.append(".") return COMMAND_BUILDX + base_cmd diff --git a/spras/omicsintegrator1.py b/spras/omicsintegrator1.py index 6c1d3f537..b3b7afbfe 100644 --- a/spras/omicsintegrator1.py +++ b/spras/omicsintegrator1.py @@ -195,7 +195,7 @@ def run(edges=None, prizes=None, dummy_nodes=None, dummy_mode=None, mu_squared=N if seed is not None: command.extend(['--seed', str(seed)]) - container_suffix = "omics-integrator-1:v1" + container_suffix = "omics-integrator-1:v2" run_container_and_log('Omics Integrator 1', container_framework, container_suffix, From e949160364c5e417d09e9e3be4b5f9f41967e100 Mon Sep 17 00:00:00 2001 From: Tristan Figueroa-Reid Date: Tue, 9 Sep 2025 22:15:37 +0000 Subject: [PATCH 25/34] chore: move sub file back to docker registry --- docker-wrappers/SPRAS/spras.sub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-wrappers/SPRAS/spras.sub b/docker-wrappers/SPRAS/spras.sub index ccdfea116..01dee32cd 100644 --- a/docker-wrappers/SPRAS/spras.sub +++ b/docker-wrappers/SPRAS/spras.sub @@ -22,7 +22,7 @@ SNAKEFILE = ../../Snakefile ############################################################ universe = container container_image = .sif -# container_image = docker://reed-compbio/spras:v0.2.0 +# container_image = docker://reedcompbio/spras:v0.2.0 ############################################################ # Specify names for log/stdout/stderr files generated by # From b4a31ebeb6ba40514d18d91ac91bc8386cc18df8 Mon Sep 17 00:00:00 2001 From: Tristan Figueroa-Reid Date: Tue, 9 Sep 2025 22:16:26 +0000 Subject: [PATCH 26/34] chore: mv push.py -> build.py --- .github/workflows/push-docker.yml | 4 ++-- .github/workflows/release.yml | 2 +- docker-wrappers/README.md | 8 ++++---- docker-wrappers/{push.py => build.py} | 0 4 files changed, 7 insertions(+), 7 deletions(-) rename docker-wrappers/{push.py => build.py} (100%) diff --git a/.github/workflows/push-docker.yml b/.github/workflows/push-docker.yml index 10f36fa70..43ea19944 100644 --- a/.github/workflows/push-docker.yml +++ b/.github/workflows/push-docker.yml @@ -26,5 +26,5 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Run push.py - run: python3 docker-wrappers/push.py --dir ${{ inputs.folder }} --version ${{ inputs.version }} --yes + - name: Run build.py + run: python3 docker-wrappers/build.py --dir ${{ inputs.folder }} --version ${{ inputs.version }} --yes diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 150ff7df5..9d4369380 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,4 +27,4 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Docker image - run: python3 docker-wrappers/push.py --dir SPRAS --version ${{ github.ref_name }} --yes + run: python3 docker-wrappers/build.py --dir SPRAS --version ${{ github.ref_name }} --yes diff --git a/docker-wrappers/README.md b/docker-wrappers/README.md index a3886ed97..2976ed199 100644 --- a/docker-wrappers/README.md +++ b/docker-wrappers/README.md @@ -4,19 +4,19 @@ This folder contains the list of all docker wrappers. We build these docker images with `buildx` to support multiple docker architectures. -For convenience, we provide a `push.py` python file which pushes a docker image with the architectures +For convenience, we provide a `build.py` python file which pushes a docker image with the architectures that we want to support. ``` -usage: push.py [-h] --dir DIR --version VERSION [--org-name ORG_NAME] [--yes | --no-yes] [--relax | --no-relax] [--nopush | --no-nopush] -push.py: error: the following arguments are required: --dir, --version +usage: build.py [-h] --dir DIR --version VERSION [--org-name ORG_NAME] [--yes | --no-yes] [--relax | --no-relax] [--nopush | --no-nopush] +build.py: error: the following arguments are required: --dir, --version ``` For example, using the default supported `ghcr.io` registry that SPRAS uses, we can push RWR v1: ``` docker login ghcr.io -u reed-compbio -python push.py --dir RWR --version v1 +python build.py --dir RWR --version v1 ``` You can also build the image without pushing it using `--nopush`, which will load the image into docker. diff --git a/docker-wrappers/push.py b/docker-wrappers/build.py similarity index 100% rename from docker-wrappers/push.py rename to docker-wrappers/build.py From 0ca98c7169cba05692cad591a712b9f2da1ca9c5 Mon Sep 17 00:00:00 2001 From: Tristan Figueroa-Reid Date: Tue, 9 Sep 2025 22:17:29 +0000 Subject: [PATCH 27/34] chore(docker-wrappers/build): mv nopush -> push --- docker-wrappers/build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-wrappers/build.py b/docker-wrappers/build.py index bbbc45d08..7a6347c1c 100644 --- a/docker-wrappers/build.py +++ b/docker-wrappers/build.py @@ -39,7 +39,7 @@ def parse_arguments(): parser.add_argument("--org-name", type=str, help="The organization to push to", default="ghcr.io/reed-compbio/") parser.add_argument("--yes", type=bool, help="Whether to automatically agree to pushing a container", action=argparse.BooleanOptionalAction) parser.add_argument("--relax", type=bool, help="Whether to not be strict on tag naming (this requires all versions start with `v`.)", action=argparse.BooleanOptionalAction) - parser.add_argument("--nopush", type=bool, help="Enabling nopush only builds the image. This is useful for testing architecture support", action=argparse.BooleanOptionalAction) + parser.add_argument("--push", type=bool, help="Enabling push pushes the image. Usually, images are only built locally.", action=argparse.BooleanOptionalAction) return parser.parse_args() @@ -73,11 +73,11 @@ def main(): print(f"- Specified tag: {tag}") print(f"- Latest tag: {tag_latest}") if not args.yes: - confirm = input("[y/n] Are you sure you want to {} these tags over these architectures? ".format("build (because of --nopush)" if args.nopush else "push to")) + confirm = input("[y/n] Are you sure you want to {} these tags over these architectures? ".format("build (to push, use --push)" if args.push else "push to")) if confirm.strip().lower() not in ('y', 'yes'): raise RuntimeError("Did not confirm dialog.") - push_command = construct_push_command([tag, tag_latest], args.dir, architectures, not args.nopush) + push_command = construct_push_command([tag, tag_latest], args.dir, architectures, args.push) result = subprocess.run(push_command, capture_output=False, cwd=cwd) exit(result.returncode) From 94ecdfc5abe9ddbfa962c088476d17133ea495fa Mon Sep 17 00:00:00 2001 From: Tristan Figueroa-Reid Date: Tue, 9 Sep 2025 22:18:20 +0000 Subject: [PATCH 28/34] docs: use push over nopush --- docker-wrappers/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-wrappers/README.md b/docker-wrappers/README.md index 2976ed199..21c16f1e1 100644 --- a/docker-wrappers/README.md +++ b/docker-wrappers/README.md @@ -8,15 +8,15 @@ For convenience, we provide a `build.py` python file which pushes a docker image that we want to support. ``` -usage: build.py [-h] --dir DIR --version VERSION [--org-name ORG_NAME] [--yes | --no-yes] [--relax | --no-relax] [--nopush | --no-nopush] +usage: build.py [-h] --dir DIR --version VERSION [--org-name ORG_NAME] [--yes | --no-yes] [--relax | --no-relax] [--push | --no-push] build.py: error: the following arguments are required: --dir, --version ``` -For example, using the default supported `ghcr.io` registry that SPRAS uses, we can push RWR v1: +For example, using the default supported `ghcr.io` registry that SPRAS uses, we can build RWR v1: ``` docker login ghcr.io -u reed-compbio python build.py --dir RWR --version v1 ``` -You can also build the image without pushing it using `--nopush`, which will load the image into docker. +You can also push the image using `--push`, which will push the image to the GitHub Container Registry. From 1e5fedcb2de0edd056855c7d9f6b35cd7b99678a Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Wed, 10 Sep 2025 00:45:30 +0000 Subject: [PATCH 29/34] docs(docker-wrappers/SPRAS): explicitly use docker hub --- docker-wrappers/SPRAS/README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docker-wrappers/SPRAS/README.md b/docker-wrappers/SPRAS/README.md index 8ef2efdd7..000a41751 100644 --- a/docker-wrappers/SPRAS/README.md +++ b/docker-wrappers/SPRAS/README.md @@ -1,8 +1,11 @@ # SPRAS Docker image +> [!NOTE] +> All other containers are on the GitHub Container Registry. Until the next SPRAS release, the SPRAS docker image will remain on Docker Hub. + ## Building Images -A Docker image for SPRAS that is available on [DockerHub](https://hub.docker.com/repository/docker/reed-compbio/spras) +A Docker image for SPRAS that is available on [DockerHub](https://hub.docker.com/repository/docker/reedcompbio/spras) This image comes bundled with all of the necessary software packages to run SPRAS, and can be used for execution in distributed environments (like HTCondor). To create the Docker image locally, make sure you are in this repository's root directory, and from your terminal run: @@ -11,9 +14,9 @@ To create the Docker image locally, make sure you are in this repository's root docker build -t /: -f docker-wrappers/SPRAS/Dockerfile . ``` -For example, to build this image with the intent of pushing it to DockerHub as reed-compbio/spras:v0.2.0, you'd run: +For example, to build this image with the intent of pushing it to DockerHub as reedcompbio/spras:v0.2.0, you'd run: ```bash -docker build -t reed-compbio/spras:v0.2.0 -f docker-wrappers/SPRAS/Dockerfile . +docker build -t reedcompbio/spras:v0.2.0 -f docker-wrappers/SPRAS/Dockerfile . ``` This will copy the entire SPRAS repository into the container and install SPRAS with `pip`. As such, any changes you've made to the current SPRAS repository will be reflected in version of SPRAS installed in the container. Since SPRAS @@ -38,9 +41,9 @@ Or to temporarily override your system's default during the build, prepend your DOCKER_DEFAULT_PLATFORM=linux/amd64 ``` -For example, to build reed-compbio/spras:v0.2.0 on Apple Silicon as a linux/amd64 container, you'd run: +For example, to build reedcompbio/spras:v0.2.0 on Apple Silicon as a linux/amd64 container, you'd run: ``` -DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build -t reed-compbio/spras:v0.2.0 -f docker-wrappers/SPRAS/Dockerfile . +DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build -t reedcompbio/spras:v0.2.0 -f docker-wrappers/SPRAS/Dockerfile . ``` ### Converting Docker Images to Apptainer/Singularity Images @@ -52,7 +55,7 @@ apptainer build .sif docker:// For example, creating an Apptainer image for the `v0.2.0` SPRAS image might look like: ```bash -apptainer build spras-v0.2.0.sif docker://reed-compbio/spras:v0.2.0 +apptainer build spras-v0.2.0.sif docker://reedcompbio/spras:v0.2.0 ``` After running this command, a new file called `spras-v0.2.0.sif` will exist in the directory where the command was run. From 299b299e867b7c2c72d0160b0e883499b6c8473e Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Wed, 10 Sep 2025 00:49:48 +0000 Subject: [PATCH 30/34] docs(contributing): use ghcr, don't mention container pushes --- docs/contributing/index.rst | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/docs/contributing/index.rst b/docs/contributing/index.rst index 57419a929..ad4036392 100644 --- a/docs/contributing/index.rst +++ b/docs/contributing/index.rst @@ -20,7 +20,6 @@ Snakemake workflow. Before following this guide, a contributor will need introduction `__) - Familiarity with Docker and Dockerfiles to create images (`Carpentries introduction `__) -- A `Docker Hub `__ account It is not necessary to have experience with Snakemake, Python testing, or pandas before getting started, but it may help with more complex @@ -133,10 +132,10 @@ Build the Docker image by running :: - docker build -t /local-neighborhood -f Dockerfile . + python3 ../build.py --dir LocalNeighborhood --version latest --org-name from the ``LocalNeighborhood`` directory, where ```` is your -Docker Hub username. Docker must be running on your system before +GitHub username. Docker must be running on your system before executing this command. Test the image by running it with the example input files @@ -162,15 +161,6 @@ have already been copied into the current working directory. Windows users may need to escape the absolute paths so that ``/data`` becomes ``//data``, etc. Confirm that the output file matches expectations. -Push the new image to Docker Hub: - -:: - - docker push /local-neighborhood - -Pushing an image requires being logged in, so run ``docker login`` first -if needed using your Docker Hub username and password. - Step 3: Write the Local Neighborhood wrapper functions ------------------------------------------------------ @@ -286,10 +276,10 @@ Local Neighborhood has no other parameters. Optionally set make testing faster. The config file has an option ``owner`` under the ``container_registry`` -settings that controls which Docker Hub account will be used when -pulling Docker images. The same Docker Hub account will be used for all +settings that controls which container registry account will be used when +pulling Docker images. The same container registry account will be used for all images and cannot currently be set different for each algorithm. Set the -``owner`` to match your Docker Hub username from Step 2. +``owner`` to match your GitHub username from Step 2. After completing this step, try running the Local Neighborhood algorithm through SPRAS with @@ -333,8 +323,8 @@ the pytest testing. Extend ``.github/workflows/build-containers.yml`` to pull and build the new Docker image. Follow the example for any of the other pathway reconstruction algorithm. First pull the image -``/local-neighborhood`` from Docker Hub. Then build the Docker -image using the ``Dockerfile`` that was completed in Step 2. +``/local-neighborhood`` from the GitHub Container Registry. +Then build the Docker image using the ``Dockerfile`` that was completed in Step 2. Modify generate inputs: @@ -421,7 +411,7 @@ General steps for contributing a new pathway reconstruction algorithm ````, and include any other files required to build that image in the subdirectory 3. Build and push the Docker image to the - `reed-compbio `__ Docker + `reed-compbio `__ GitHub organization (SPRAS maintainer required) 4. Add a new Python file ``spras/.py`` to implement the wrapper functions for ````: specify the list of From 6df7b0d565c0dc3e5377a0bcd4a649c7ab6d75da Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Tue, 14 Oct 2025 03:24:45 +0000 Subject: [PATCH 31/34] docs: more clarification --- docker-wrappers/AllPairs/README.md | 4 +- docker-wrappers/BowTieBuilder/README.md | 7 +++- docker-wrappers/Cytoscape/README.md | 6 +-- docker-wrappers/DOMINO/README.md | 4 ++ docker-wrappers/MEO/README.md | 4 ++ docker-wrappers/MinCostFlow/README.md | 4 ++ docker-wrappers/PathLinker/README.md | 4 +- docker-wrappers/README.md | 15 +++++-- docker-wrappers/RWR/README.md | 4 ++ docker-wrappers/ResponseNet/README.md | 5 +++ docker-wrappers/ST_RWR/README.md | 6 ++- docker-wrappers/build.py | 56 ++++++++++++++++++++----- 12 files changed, 96 insertions(+), 23 deletions(-) diff --git a/docker-wrappers/AllPairs/README.md b/docker-wrappers/AllPairs/README.md index b55887dbc..d1c86a5a6 100644 --- a/docker-wrappers/AllPairs/README.md +++ b/docker-wrappers/AllPairs/README.md @@ -27,5 +27,5 @@ The Docker wrapper can be tested with `pytest -k test_ap.py` from the root of th - Samples of an input network and source/target file are located under test/AllPairs/input. ## Versions: -- (docker hub) v1: Initial version. Copies source file from SPRAS repository. -- v1: Add bash, which is not available in Alpine Linux. +- v1: Initial version. Copies source file from SPRAS repository. +- v2: Add bash, which is not available in Alpine Linux. diff --git a/docker-wrappers/BowTieBuilder/README.md b/docker-wrappers/BowTieBuilder/README.md index dc541d66b..ec92b44f5 100644 --- a/docker-wrappers/BowTieBuilder/README.md +++ b/docker-wrappers/BowTieBuilder/README.md @@ -12,4 +12,9 @@ from this directory. The original paper for [BowTieBuilder] can be accessed here: -Supper, J., Spangenberg, L., Planatscher, H. et al. BowTieBuilder: modeling signal transduction pathways. BMC Syst Biol 3, 67 (2009). https://doi.org/10.1186/1752-0509-3-67 \ No newline at end of file +Supper, J., Spangenberg, L., Planatscher, H. et al. BowTieBuilder: modeling signal transduction pathways. BMC Syst Biol 3, 67 (2009). https://doi.org/10.1186/1752-0509-3-67 + +## Versions + +- `v1`: Initial docker container +- `v2`: Pin BTB file version for reproducible docker builds. diff --git a/docker-wrappers/Cytoscape/README.md b/docker-wrappers/Cytoscape/README.md index ab6812446..e54fe7f99 100644 --- a/docker-wrappers/Cytoscape/README.md +++ b/docker-wrappers/Cytoscape/README.md @@ -18,9 +18,9 @@ Test code is located in `test/analysis/test_cytoscape.py`. The Docker wrapper can be tested with `pytest`. ## Versions: -- (docker hub) v1: Use supervisord to launch Cytoscape from a Python subprocess, then connect to Cytoscape with py4cytoscape. Only loads undirected pathways. Compatible with Singularity in local testing (Apptainer version 1.2.2-1.el7) but fails in GitHub Actions. -- (docker hub) v2: Add support for edge direction column. -- v1: Add support for header lines in files +- v1: Use supervisord to launch Cytoscape from a Python subprocess, then connect to Cytoscape with py4cytoscape. Only loads undirected pathways. Compatible with Singularity in local testing (Apptainer version 1.2.2-1.el7) but fails in GitHub Actions. +- v2: Add support for edge direction column. +- v3: Add support for header lines in files ## TODO - Add an auth file for `xvfb-run` diff --git a/docker-wrappers/DOMINO/README.md b/docker-wrappers/DOMINO/README.md index 074cf6c6a..3aa37e9b5 100644 --- a/docker-wrappers/DOMINO/README.md +++ b/docker-wrappers/DOMINO/README.md @@ -21,3 +21,7 @@ The `winpty` prefix is only needed on Windows. - Resolve upstream ValueError with small inputs https://github.com/Shamir-Lab/DOMINO/issues/11 - Use cache or reuse slices files from previous runs on the same network - Investigate why DOMINO does not build on amd64 after https://github.com/Reed-CompBio/spras/pull/235. + +## Versions + +- `v1`: Initial DOMINO container. diff --git a/docker-wrappers/MEO/README.md b/docker-wrappers/MEO/README.md index d04929eb1..6f7752212 100644 --- a/docker-wrappers/MEO/README.md +++ b/docker-wrappers/MEO/README.md @@ -22,3 +22,7 @@ The Docker wrapper can be tested with `pytest`. - Attribute https://github.com/agitter/meo/ - Document usage - Consider Alpine-based base image + +## Versions + +- `v1`: Initial MEO container diff --git a/docker-wrappers/MinCostFlow/README.md b/docker-wrappers/MinCostFlow/README.md index 8757f903a..650af9d8f 100644 --- a/docker-wrappers/MinCostFlow/README.md +++ b/docker-wrappers/MinCostFlow/README.md @@ -36,3 +36,7 @@ docker run -w /data --mount type=bind,source=/${PWD},target=/data reed-compbio/m This will run MinCostFlow on the test input files and write the output files to the root of the `spras` repository. Windows users may need to escape the absolute paths so that `/data` becomes `//data`, etc. + +## Versions + +- `v1`: Initial MinCostFlow docker container. diff --git a/docker-wrappers/PathLinker/README.md b/docker-wrappers/PathLinker/README.md index fec05396a..3aff459ae 100644 --- a/docker-wrappers/PathLinker/README.md +++ b/docker-wrappers/PathLinker/README.md @@ -28,8 +28,8 @@ This will run PathLinker on the test input files and write the output files to t Windows users may need to escape the absolute paths so that `/data` becomes `//data`, etc. ## Versions: -- (docker hub) v1: Initial version. Copies PathLinker source files from GitHub and pip installs packages from requirements file. -- v1: Add bash, which is not available in Alpine Linux. +- v1: Initial version. Copies PathLinker source files from GitHub and pip installs packages from requirements file. +- v2: Add bash, which is not available in Alpine Linux. ## TODO - Attribute https://github.com/Murali-group/PathLinker diff --git a/docker-wrappers/README.md b/docker-wrappers/README.md index 21c16f1e1..654b8adc2 100644 --- a/docker-wrappers/README.md +++ b/docker-wrappers/README.md @@ -4,19 +4,28 @@ This folder contains the list of all docker wrappers. We build these docker images with `buildx` to support multiple docker architectures. +## `build.py` + For convenience, we provide a `build.py` python file which pushes a docker image with the architectures that we want to support. ``` -usage: build.py [-h] --dir DIR --version VERSION [--org-name ORG_NAME] [--yes | --no-yes] [--relax | --no-relax] [--push | --no-push] +usage: build.py [-h] --dir DIR --version VERSION [--org-name ORG_NAME] [--yes | --no-yes] [--relax | --no-relax] [--push | --no-push] [--load | --no-load] build.py: error: the following arguments are required: --dir, --version ``` For example, using the default supported `ghcr.io` registry that SPRAS uses, we can build RWR v1: -``` +```sh docker login ghcr.io -u reed-compbio python build.py --dir RWR --version v1 ``` -You can also push the image using `--push`, which will push the image to the GitHub Container Registry. +> [!NOTE] +> To use a docker image locally with this script, you must use `--load`. See below for more information. + +There are also two boolean settings: +- `--push`: pushes the image to the GitHub Container Registry. +- `--load`: loads the image into your local container registry. This only works with your system architecture, and multi-architecture builds can be tested by omitting `--load`. + +In general, use `--push` for production, `--load` for local development, and omit both to test the docker container on all architectures (which will happen on CI.) diff --git a/docker-wrappers/RWR/README.md b/docker-wrappers/RWR/README.md index 625d52e42..9e260968f 100644 --- a/docker-wrappers/RWR/README.md +++ b/docker-wrappers/RWR/README.md @@ -16,3 +16,7 @@ docker build -t reed-compbio/rwr -f Dockerfile . Test code is located in `test/RWR`. The `input` subdirectory contains test files `rwr-network.txt`, `rwr-sources.txt`, and `rwr-targets.txt` The Docker wrapper can be tested with `pytest`. + +## Versions + +- v1: Initial version. diff --git a/docker-wrappers/ResponseNet/README.md b/docker-wrappers/ResponseNet/README.md index e0b46e61e..2df23f2b9 100644 --- a/docker-wrappers/ResponseNet/README.md +++ b/docker-wrappers/ResponseNet/README.md @@ -1,3 +1,8 @@ # ResponseNet Docker Image A Docker image for [ResponseNet](https://github.com/Reed-CompBio/ResponseNet) that is available on the [GitHub Container Registry](https://github.com/orgs/Reed-CompBio/packages/container/package/responsenet). + +## Versions + +- v1: Initial version. +- v2: Pin ResponseNet source code. diff --git a/docker-wrappers/ST_RWR/README.md b/docker-wrappers/ST_RWR/README.md index 0e777a317..5bc10623c 100644 --- a/docker-wrappers/ST_RWR/README.md +++ b/docker-wrappers/ST_RWR/README.md @@ -15,4 +15,8 @@ docker build -t reed-compbio/st-rwr -f Dockerfile . ## Testing Test code is located in `test/ST_RWR`. The `input` subdirectory contains test files `strwr-network.txt`, `strwr-sources.txt`, and `strwr-targets.txt` -The Docker wrapper can be tested with `pytest`. \ No newline at end of file +The Docker wrapper can be tested with `pytest`. + +## Versions + +- v1: Initial version. diff --git a/docker-wrappers/build.py b/docker-wrappers/build.py index 7a6347c1c..ecc293a7e 100644 --- a/docker-wrappers/build.py +++ b/docker-wrappers/build.py @@ -16,16 +16,34 @@ def construct_push_command( tags: list[str], dir: str, architectures: list[str], - push: bool -): + push: bool, + load: bool +) -> list[str]: + """ + Constructs the docker command to be run by this script + """ base_cmd = ["build"] for tag in tags: base_cmd.extend(["--tag", tag]) - base_cmd = base_cmd + ["--file", Path(dir_path, dir, "Dockerfile"), "--platform", - ",".join(architectures), "--builder", "container"] - # --load loads an image into the docker environment, which is the normal behavior - # for docker build. - base_cmd.append("--push" if push else "--load") + + if push and load: + raise RuntimeError("You specified both container pushing and container loading. Did you mean to test the container first?") + + base_cmd = base_cmd + [ + "--file", + str(Path(dir_path, dir, "Dockerfile"))] + + if not load: + # Add the architectures if load is not specified. + base_cmd = base_cmd + ["--platform", ",".join(architectures)] + + base_cmd = base_cmd + ["--builder", "container"] + + if push: base_cmd.append("--push") + if load: base_cmd.append("--load") + + # The 'local' directory: the CWD is set by the python code + # running this function's output command. base_cmd.append(".") return COMMAND_BUILDX + base_cmd @@ -40,6 +58,9 @@ def parse_arguments(): parser.add_argument("--yes", type=bool, help="Whether to automatically agree to pushing a container", action=argparse.BooleanOptionalAction) parser.add_argument("--relax", type=bool, help="Whether to not be strict on tag naming (this requires all versions start with `v`.)", action=argparse.BooleanOptionalAction) parser.add_argument("--push", type=bool, help="Enabling push pushes the image. Usually, images are only built locally.", action=argparse.BooleanOptionalAction) + # This is a (sensible) limitation of docker: https://github.com/docker/buildx/issues/59. We don't say what architecture we want + # to default to the system architecture. + parser.add_argument("--load", type=bool, help="Enabling load adds a docker image to your local machine. This uses your local architecture.", action=argparse.BooleanOptionalAction) return parser.parse_args() @@ -64,20 +85,33 @@ def main(): metadata = json.loads(metadata_path.read_text()) name = metadata['imageName'] architectures = metadata['architectures'] + + assert len(architectures) > 0, "you must specify at least one container architecture!" + cwd = str(Path(dir_path, args.dir, metadata['cwd']) if 'cwd' in metadata else Path(dir_path, args.dir)) tag = args.org_name + name + ":" + args.version tag_latest = args.org_name + name + ":latest" - print(f"Building {name} over {architectures} with:") + if args.load: + print(f"Building {name} only on the system architecture with:") + else: + print(f"Building {name} over {architectures} with:") print(f"- CWD: {cwd}") print(f"- Specified tag: {tag}") - print(f"- Latest tag: {tag_latest}") + print(f"- Latest tag: {tag_latest}\n") + if args.push: + print("The docker images with the above tags will be _pushed_. (This command will also test all provided architectures beforehand.)") + elif args.load: + print("The docker images with the above tags will be _loaded_. This command will not test all provided architectures. To test, omit --load.") + else: + print("The docker images with the above tags will be _tested_. This command will not push (use --push) or allow this image to be used locally (use --load)") if not args.yes: - confirm = input("[y/n] Are you sure you want to {} these tags over these architectures? ".format("build (to push, use --push)" if args.push else "push to")) + confirm_string = "[y/n] Are you sure you want to do this? " + confirm = input(confirm_string) if confirm.strip().lower() not in ('y', 'yes'): raise RuntimeError("Did not confirm dialog.") - push_command = construct_push_command([tag, tag_latest], args.dir, architectures, args.push) + push_command = construct_push_command([tag, tag_latest], args.dir, architectures, push=args.push, load=args.load) result = subprocess.run(push_command, capture_output=False, cwd=cwd) exit(result.returncode) From 57a325313c13a589e291385c368b0b195c539bc1 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Tue, 14 Oct 2025 03:31:07 +0000 Subject: [PATCH 32/34] fix: paths --- docker-wrappers/AllPairs/README.md | 1 + spras/allpairs.py | 2 +- spras/pathlinker.py | 2 +- spras/responsenet.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docker-wrappers/AllPairs/README.md b/docker-wrappers/AllPairs/README.md index d1c86a5a6..3110668f2 100644 --- a/docker-wrappers/AllPairs/README.md +++ b/docker-wrappers/AllPairs/README.md @@ -29,3 +29,4 @@ The Docker wrapper can be tested with `pytest -k test_ap.py` from the root of th ## Versions: - v1: Initial version. Copies source file from SPRAS repository. - v2: Add bash, which is not available in Alpine Linux. +- v3: AllPairs directionality diff --git a/spras/allpairs.py b/spras/allpairs.py index 2a51a94fd..346ea6f91 100644 --- a/spras/allpairs.py +++ b/spras/allpairs.py @@ -105,7 +105,7 @@ def run(nodetypes=None, network=None, directed_flag=None, output_file=None, cont if Path(directed_flag).read_text().strip() == "true": command.append("--directed") - container_suffix = "allpairs:v1" + container_suffix = "allpairs:v3" run_container_and_log( 'All Pairs Shortest Paths', container_framework, diff --git a/spras/pathlinker.py b/spras/pathlinker.py index 0111f386b..c7cabc97b 100644 --- a/spras/pathlinker.py +++ b/spras/pathlinker.py @@ -112,7 +112,7 @@ def run(nodetypes=None, network=None, output_file=None, k=None, container_framew if k is not None: command.extend(['-k', str(k)]) - container_suffix = "pathlinker:v1" + container_suffix = "pathlinker:v2" run_container_and_log('PathLinker', container_framework, container_suffix, diff --git a/spras/responsenet.py b/spras/responsenet.py index cef44fb0b..bbc3b5255 100644 --- a/spras/responsenet.py +++ b/spras/responsenet.py @@ -102,7 +102,7 @@ def run(sources=None, targets=None, edges=None, output_file=None, gamma=10, cont '--gamma', str(gamma)] # choosing to run in docker or singularity container - container_suffix = "responsenet:v1" + container_suffix = "responsenet:v2" # constructs a docker run call run_container_and_log( From 3bafaf7a36a1c9085ebd6696866d9180ae9cb995 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Tue, 14 Oct 2025 03:59:24 +0000 Subject: [PATCH 33/34] style: fmt --- docker-wrappers/build.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-wrappers/build.py b/docker-wrappers/build.py index ecc293a7e..66d88f719 100644 --- a/docker-wrappers/build.py +++ b/docker-wrappers/build.py @@ -25,20 +25,20 @@ def construct_push_command( base_cmd = ["build"] for tag in tags: base_cmd.extend(["--tag", tag]) - + if push and load: raise RuntimeError("You specified both container pushing and container loading. Did you mean to test the container first?") - + base_cmd = base_cmd + [ "--file", str(Path(dir_path, dir, "Dockerfile"))] - + if not load: # Add the architectures if load is not specified. base_cmd = base_cmd + ["--platform", ",".join(architectures)] base_cmd = base_cmd + ["--builder", "container"] - + if push: base_cmd.append("--push") if load: base_cmd.append("--load") From bfcc0ef924d6d58456854a175b68f5ce4aa4c5fb Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Fri, 24 Oct 2025 16:10:26 -0700 Subject: [PATCH 34/34] fix(schema): correct default container prefix --- spras/config/container_schema.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spras/config/container_schema.py b/spras/config/container_schema.py index e85d22e60..3e64971ff 100644 --- a/spras/config/container_schema.py +++ b/spras/config/container_schema.py @@ -13,7 +13,7 @@ from spras.config.util import CaseInsensitiveEnum -DEFAULT_CONTAINER_PREFIX = "docker.io/reedcompbio" +DEFAULT_CONTAINER_PREFIX = "ghcr.io/reed-compbio" class ContainerFramework(CaseInsensitiveEnum): docker = 'docker' @@ -64,7 +64,7 @@ def from_container_settings(settings: ContainerSettings, hash_length: int) -> "P warnings.warn("unpack_singularity is set to True, but the container framework is not singularity. This setting will have no effect.", stacklevel=2) unpack_singularity = settings.unpack_singularity - # Grab registry from the config, and if none is provided default to docker + # Grab registry from the config, and if none is provided default to GHCR container_prefix = DEFAULT_CONTAINER_PREFIX if settings.registry and settings.registry.base_url != "" and settings.registry.owner != "": container_prefix = settings.registry.base_url + "/" + settings.registry.owner