Skip to content

Commit

Permalink
Read image and container type from destination info
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Dec 11, 2023
1 parent 4836aa5 commit cdcea8c
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions lib/galaxy/jobs/runners/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,27 +562,30 @@ def _find_container(
return container

def _get_metadata_container(self, job_wrapper):
tool_info = ToolInfo(
[ContainerDescription("galaxyproject/galaxy-job-execution")],
[],
False,
[],
guest_ports=None,
tool_id="__SET_METADATA__",
tool_version="1.0.3",
profile=23.2,
)
job_info = JobInfo(
working_directory=job_wrapper.working_directory,
tool_directory=None,
job_directory=None,
tmp_directory=None,
home_directory=None,
job_directory_type="galaxy",
)

destination_info = job_wrapper.job_destination.params
return self.app.container_finder.find_container(tool_info, destination_info, job_info)
if destination_info.get("metadata_config", {}).get("containerize"):
image = destination_info["metadata_config"].get("image", "galaxyproject/galaxy-job-execution")
container_type = destination_info["metadata_config"].get("engine", "docker")
tool_info = ToolInfo(
[ContainerDescription(image, type=container_type)],
[],
False,
[],
guest_ports=None,
tool_id="__SET_METADATA__",
tool_version="1.0.3",
profile=23.2,
)
job_info = JobInfo(
working_directory=job_wrapper.working_directory,
tool_directory=None,
job_directory=None,
tmp_directory=None,
home_directory=None,
job_directory_type="galaxy",
)

return self.app.container_finder.find_container(tool_info, destination_info, job_info)

def _handle_runner_state(self, runner_state, job_state: "JobState"):
try:
Expand Down

0 comments on commit cdcea8c

Please sign in to comment.