Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bash to PathLinker image #164

Merged
merged 5 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 7 additions & 6 deletions .github/workflows/test-spras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@ jobs:
run: |
docker pull reedcompbio/omics-integrator-1:latest
docker pull reedcompbio/omics-integrator-2:v2
docker pull reedcompbio/pathlinker:latest
docker pull reedcompbio/pathlinker:v2
docker pull reedcompbio/meo:latest
docker pull reedcompbio/mincostflow:latest
docker pull reedcompbio/allpairs:latest
docker pull reedcompbio/allpairs:v2
docker pull reedcompbio/domino:latest
docker pull reedcompbio/py4cytoscape:v2
- name: Build Omics Integrator 1 Docker image
uses: docker/build-push-action@v1
with:
Expand All @@ -99,15 +100,15 @@ jobs:
dockerfile: docker-wrappers/OmicsIntegrator2/Dockerfile
repository: reedcompbio/omics-integrator-2
tags: v2
cache_froms: reedcompbio/omics-integrator-2:v2
cache_froms: reedcompbio/omics-integrator-2:latest
push: false
- name: Build PathLinker Docker image
uses: docker/build-push-action@v1
with:
path: docker-wrappers/PathLinker/.
dockerfile: docker-wrappers/PathLinker/Dockerfile
repository: reedcompbio/pathlinker
tags: latest
tags: v2
cache_froms: reedcompbio/pathlinker:latest
push: false
- name: Build Maximum Edge Orientation Docker image
Expand All @@ -134,7 +135,7 @@ jobs:
path: docker-wrappers/AllPairs/.
dockerfile: docker-wrappers/AllPairs/Dockerfile
repository: reedcompbio/allpairs
tags: latest
tags: v2
cache_froms: reedcompbio/allpairs:latest
push: false
- name: Build DOMINO Docker image
Expand All @@ -153,7 +154,7 @@ jobs:
dockerfile: docker-wrappers/Cytoscape/Dockerfile
repository: reedcompbio/py4cytoscape
tags: v2
cache_froms: reedcompbio/py4cytoscape:v2
cache_froms: reedcompbio/py4cytoscape:latest
push: false

# Run pre-commit checks on source files
Expand Down
3 changes: 3 additions & 0 deletions docker-wrappers/AllPairs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# AllPairs wrapper
FROM python:3.9-alpine3.16

# bash is required for dsub in the All of Us cloud environment
RUN apk add --no-cache bash

WORKDIR /AllPairs

RUN pip install networkx==2.6.3
Expand Down
4 changes: 4 additions & 0 deletions docker-wrappers/AllPairs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ The Docker wrapper can be tested with `pytest -k test_ap.py` from the root of th
## Notes
- The `all-pairs-shortest-paths.py` code is located locally in SPRAS (since the code is short). It is under `docker-wrappers/AllPairs`.
- 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.
3 changes: 2 additions & 1 deletion docker-wrappers/PathLinker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ FROM python:3.5.10-alpine

# gettext is required for the envsubst command
# See https://github.com/haskell/cabal/issues/6126 regarding wget
RUN apk add --no-cache ca-certificates gettext wget
# bash is required for dsub in the All of Us cloud environment
RUN apk add --no-cache ca-certificates gettext wget bash

WORKDIR /PathLinker
COPY pathlinker-files.txt .
Expand Down
4 changes: 4 additions & 0 deletions docker-wrappers/PathLinker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ docker run -w /data --mount type=bind,source=/${PWD},target=/data reedcompbio/pa
This will run PathLinker 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 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
- Document usage
3 changes: 1 addition & 2 deletions spras/allpairs.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ def run(nodetypes=None, network=None, output_file=None, container_framework="doc

print('Running All Pairs Shortest Paths with arguments: {}'.format(' '.join(command)), flush=True)

container_suffix = "allpairs"

container_suffix = "allpairs:v2"
out = run_container(
container_framework,
container_suffix,
Expand Down
2 changes: 1 addition & 1 deletion spras/pathlinker.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def run(nodetypes=None, network=None, output_file=None, k=None, container_framew

print('Running PathLinker with arguments: {}'.format(' '.join(command)), flush=True)

container_suffix = "pathlinker"
container_suffix = "pathlinker:v2"
out = run_container(container_framework,
container_suffix,
command,
Expand Down
Loading