Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
eb36a7a
feat: push
tristan-f-r Jul 3, 2025
bc9ba10
ci: push docker
tristan-f-r Jul 3, 2025
d84be32
ci(push-docker): specify yes-flag
tristan-f-r Jul 3, 2025
800e727
feat: tag, latest and such
tristan-f-r Jul 3, 2025
57998e3
chore: forcibly break ci
tristan-f-r Jul 3, 2025
f947332
feat: better push support over metadata
tristan-f-r Jul 3, 2025
367ea72
chore: bmp oi1
tristan-f-r Jul 3, 2025
b7c9e2c
ci: test using ghcr
tristan-f-r Jul 3, 2025
eb5ae66
chore: specify v1 for domino
tristan-f-r Jul 3, 2025
5dccba4
docs: drop 'no-conda'
tristan-f-r Jul 7, 2025
1e92433
Merge branch 'main' into docker-push
tristan-f-r Aug 24, 2025
514b1ea
Merge branch 'main' into docker-push
tristan-f-r Aug 24, 2025
2e40235
docs: update docker references to ghcr
tristan-f-r Aug 30, 2025
6e83f15
docs(push): clean
tristan-f-r Aug 30, 2025
23621b2
refactor: dockerName -> imageName
tristan-f-r Aug 30, 2025
fa66c42
chore: push responsenet to ghcr, add ghcr links
tristan-f-r Aug 30, 2025
2950a44
chore: label all associated containers
tristan-f-r Aug 30, 2025
cbb19be
chore(docker-wrappers): don't use legacy syntax
tristan-f-r Aug 30, 2025
573240c
chore: use v1 for rn
tristan-f-r Aug 30, 2025
f22b05b
no-push flag, document arch problems
tristan-f-r Aug 30, 2025
eee5c0a
docs: link to issues
tristan-f-r Aug 30, 2025
2594277
ci: check responsenet
tristan-f-r Aug 30, 2025
28eab0e
Merge branch 'docker-push-test'
tristan-f-r Aug 30, 2025
43ebaee
ci: add perms for r/w
tristan-f-r Aug 30, 2025
1687ba0
docs: mention new v1 for ghcr
tristan-f-r Aug 30, 2025
b95838a
ci: use ghcr on release
tristan-f-r Aug 30, 2025
9f35f0d
Merge branch 'main' into docker-push
tristan-f-r Aug 30, 2025
6f2d689
fix(oi1): custom python installation
tristan-f-r Aug 31, 2025
e4c0bb4
Merge branch 'main' into docker-push
tristan-f-r Sep 6, 2025
c0b2929
Merge branch 'main' into docker-push
tristan-f-r Sep 9, 2025
e949160
chore: move sub file back to docker registry
tristan-f-r Sep 9, 2025
b4a31eb
chore: mv push.py -> build.py
tristan-f-r Sep 9, 2025
0ca98c7
chore(docker-wrappers/build): mv nopush -> push
tristan-f-r Sep 9, 2025
94ecdfc
docs: use push over nopush
tristan-f-r Sep 9, 2025
1e5fedc
docs(docker-wrappers/SPRAS): explicitly use docker hub
tristan-f-r Sep 10, 2025
299b299
docs(contributing): use ghcr, don't mention container pushes
tristan-f-r Sep 10, 2025
3bccb93
Merge branch 'main' into docker-push
tristan-f-r Oct 4, 2025
4f81abd
Merge branch 'main' into docker-push
tristan-f-r Oct 14, 2025
6df7b0d
docs: more clarification
tristan-f-r Oct 14, 2025
57a3253
fix: paths
tristan-f-r Oct 14, 2025
3bafaf7
style: fmt
tristan-f-r Oct 14, 2025
49c5b96
Merge branch 'umain' into docker-push
tristan-f-r Oct 24, 2025
bfcc0ef
fix(schema): correct default container prefix
tristan-f-r Oct 24, 2025
84e86d5
Merge branch 'main' into docker-push
tristan-f-r Nov 8, 2025
afbe33e
Merge branch 'main' into docker-push
tristan-f-r Dec 7, 2025
902292a
Merge branch 'main' into docker-push
tristan-f-r Jan 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/build-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,47 +12,47 @@ 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-responsenet:
uses: "./.github/workflows/build-and-remove-template.yml"
with:
Expand All @@ -62,7 +62,7 @@ jobs:
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.
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/push-docker.yml
Original file line number Diff line number Diff line change
@@ -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 }}
Comment thread
tristan-f-r marked this conversation as resolved.
- name: Run push.py
run: python3 docker-wrappers/push.py --dir ${{ inputs.folder }} --version ${{ inputs.version }} --yes
Comment thread
tristan-f-r marked this conversation as resolved.
Outdated
6 changes: 3 additions & 3 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,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
Comment thread
tristan-f-r marked this conversation as resolved.
Outdated
# 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
Expand Down
4 changes: 4 additions & 0 deletions docker-wrappers/AllPairs/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dockerName": "allpairs",
Comment thread
tristan-f-r marked this conversation as resolved.
Outdated
"architectures": ["linux/arm64", "linux/amd64"]
}
4 changes: 4 additions & 0 deletions docker-wrappers/BowTieBuilder/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dockerName": "bowtiebuilder",
"architectures": ["linux/arm64", "linux/amd64"]
}
4 changes: 4 additions & 0 deletions docker-wrappers/Cytoscape/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dockerName": "py4cytoscape",
"architectures": ["linux/arm64", "linux/amd64"]
}
4 changes: 4 additions & 0 deletions docker-wrappers/DOMINO/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dockerName": "domino",
"architectures": ["linux/amd64"]
Comment thread
tristan-f-r marked this conversation as resolved.
}
4 changes: 4 additions & 0 deletions docker-wrappers/MEO/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dockerName": "meo",
"architectures": ["linux/arm64", "linux/amd64"]
}
4 changes: 4 additions & 0 deletions docker-wrappers/MinCostFlow/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dockerName": "mincostflow",
"architectures": ["linux/arm64", "linux/amd64"]
}
14 changes: 5 additions & 9 deletions docker-wrappers/OmicsIntegrator1/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 && \
Expand All @@ -24,7 +22,5 @@ RUN commit=0a57ede6beeef6e63b86d19898e560d62015e85d && \
ENV MSGSTEINER_PATH=/OmicsIntegrator/msgsteiner-1.3/msgsteiner
WORKDIR /OmicsIntegrator

COPY environment.yml .
Comment thread
tristan-f-r marked this conversation as resolved.
Outdated
RUN conda env create -f environment.yml

ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "oi1"]
COPY requirements.txt .
RUN pip install -r requirements.txt
26 changes: 0 additions & 26 deletions docker-wrappers/OmicsIntegrator1/Dockerfile_no_conda

This file was deleted.

4 changes: 4 additions & 0 deletions docker-wrappers/OmicsIntegrator1/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dockerName": "omics-integrator-1",
Comment thread
tristan-f-r marked this conversation as resolved.
Outdated
"architectures": ["linux/amd64"]
}
4 changes: 4 additions & 0 deletions docker-wrappers/OmicsIntegrator2/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dockerName": "omics-integrator-2",
"architectures": ["linux/amd64"]
Comment thread
tristan-f-r marked this conversation as resolved.
}
4 changes: 4 additions & 0 deletions docker-wrappers/PathLinker/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dockerName": "pathlinker",
"architectures": ["linux/arm64", "linux/amd64"]
}
20 changes: 20 additions & 0 deletions docker-wrappers/README.md
Original file line number Diff line number Diff line change
@@ -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
Comment thread
tristan-f-r marked this conversation as resolved.
Outdated
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
```
4 changes: 4 additions & 0 deletions docker-wrappers/RWR/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dockerName": "rwr",
"architectures": ["linux/arm64", "linux/amd64"]
}
5 changes: 5 additions & 0 deletions docker-wrappers/SPRAS/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dockerName": "spras",
"architectures": ["linux/arm64", "linux/amd64"],
"cwd": "../../"
}
2 changes: 1 addition & 1 deletion docker-wrappers/ST_RWR/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions docker-wrappers/ST_RWR/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dockerName": "st-rwr",
"architectures": ["linux/arm64", "linux/amd64"]
}
73 changes: 73 additions & 0 deletions docker-wrappers/push.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import argparse
import json
import os
import subprocess
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(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",
",".join(architectures), "--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", action=argparse.BooleanOptionalAction)
parser.add_argument("--relax", type=bool, help="Whether to not be strict on tag naming", action=argparse.BooleanOptionalAction)
Comment thread
tristan-f-r marked this conversation as resolved.
Outdated

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 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, ...)")

metadata_path = Path(dir_path, args.dir, "metadata.json")
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("[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, architectures)
subprocess.run(push_command, capture_output=False, cwd=cwd)

if __name__ == '__main__':
main()
2 changes: 1 addition & 1 deletion spras/allpairs.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,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,
Expand Down
2 changes: 1 addition & 1 deletion spras/analysis/cytoscape.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion spras/btb.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,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,
Expand Down
2 changes: 1 addition & 1 deletion spras/domino.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,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,
Expand Down
2 changes: 1 addition & 1 deletion spras/meo.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,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,
Expand Down
2 changes: 1 addition & 1 deletion spras/mincostflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,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',
Expand Down
4 changes: 2 additions & 2 deletions spras/omicsintegrator1.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ 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"
run_container_and_log('Omics Integrator 1',
container_framework,
container_suffix, # no-conda version is the default
container_suffix,
command,
volumes,
work_dir,
Expand Down
Loading
Loading