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

copy & paste cwl-docker-extract code from main.py #244

Merged
merged 1 commit into from
Jun 20, 2024
Merged
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
9 changes: 9 additions & 0 deletions src/sophios/api/pythonapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"""CLT utilities."""
import logging
from pathlib import Path
import subprocess as sub
from typing import Any, ClassVar, Optional, TypeVar, Union

import cwl_utils.parser as cu_parser
Expand Down Expand Up @@ -753,6 +754,14 @@ def run(self) -> None:
args = get_args(self.process_name) # Use mock CLI args
rose_tree: RoseTree = compiler_info.rose

# cwl-docker-extract recursively `docker pull`s all images in all subworkflows.
# This is important because cwltool only uses `docker run` when executing
# workflows, and if there is a local image available,
# `docker run` will NOT query the remote repository for the latest image!
# cwltool has a --force-docker-pull option, but this may cause multiple pulls in parallel.
cmd = ['cwl-docker-extract', '--force-download', f'autogenerated/{self.process_name}.cwl']
sub.run(cmd, check=True)

# If you don't like it, you can programmatically overwrite anything in args
# args.docker_remove_entrypoints = True
if args.docker_remove_entrypoints:
Expand Down
Loading