Skip to content

Commit f7710bf

Browse files
logan-blaineclaude
andcommitted
Install procps so Nextflow's task wrapper can run
The pipeline still failed after the system-prefix fix, with exit 1, empty stdout and no traceback. The image was correct -- exit 1 (not 127/126) proves the adapter script was found and its shebang resolved, so bin/ injection and the interpreter were both working. The cause was the one real line in the task log: Command 'ps' required by nextflow to collect task metrics cannot be found Nextflow's task wrapper shells out to `ps`, so without procps the task dies before the process script ever runs. With PYTHONUNBUFFERED=1 set, a payload crash would have printed something; nothing did, because Python never started. nf-core requires procps in every container for exactly this reason. python:3.11-slim omits it, and the pytorch base image this Dockerfile replaced happened to include it, so the loss went unnoticed at the base-image swap. Covered by a build-time check and a CI smoke test so it cannot regress. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent fb4a5cc commit f7710bf

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

‎.github/workflows/docker.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ jobs:
8282
# Default CMD is ["perturbo", "--help"].
8383
docker run --rm perturbo:ci
8484
docker run --rm perturbo:ci perturbo --help
85+
# Nextflow's task wrapper shells out to `ps`; without it the task dies
86+
# before the process script runs, which looks like a silent payload crash.
87+
docker run --rm perturbo:ci ps -o pid,comm
8588
# How the pipeline's bin/*.py scripts (`#!/usr/bin/env python`) enter
8689
# Python. A venv symlink or wrapper at /usr/local/bin/python breaks
8790
# exactly this while leaving `perturbo` itself working.

‎Dockerfile‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,15 @@ ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
1010
PYTHONUNBUFFERED=1 \
1111
XLA_PYTHON_CLIENT_PREALLOCATE=false
1212

13+
# procps supplies `ps`, which Nextflow's task wrapper shells out to in order to
14+
# collect task metrics. Without it the wrapper reports "Command 'ps' required by
15+
# nextflow to collect task metrics cannot be found" and the task dies BEFORE the
16+
# process script runs -- exit 1, empty stdout, no traceback, which reads exactly
17+
# like a silent crash in the payload. nf-core requires procps in every container
18+
# for this reason. python:3.11-slim omits it; the pytorch base image this
19+
# Dockerfile replaced happened to include it, so the loss went unnoticed.
1320
RUN apt-get update \
14-
&& apt-get install -y --no-install-recommends ca-certificates \
21+
&& apt-get install -y --no-install-recommends ca-certificates procps \
1522
&& rm -rf /var/lib/apt/lists/*
1623

1724
# uv lives OUTSIDE /usr/local so the sync below (which prunes its target
@@ -51,6 +58,7 @@ RUN uv sync --locked --no-dev --no-editable --extra cuda
5158
# actually enter Python, and it is what the venv layouts kept breaking.
5259
RUN set -eu \
5360
&& test ! -e /app/.venv || { echo "FATAL: a venv exists; deps must be in the system prefix"; exit 1; } \
61+
&& command -v ps >/dev/null || { echo "FATAL: no ps; Nextflow's task wrapper needs it"; exit 1; } \
5462
&& python -c 'import sys, perturbo; print("python ->", sys.executable, "| perturbo", getattr(perturbo, "__version__", "?"))' \
5563
&& python3 -c 'import perturbo' \
5664
&& /usr/bin/env python -c 'import perturbo' \

0 commit comments

Comments
 (0)