Skip to content

fix(container): rebuild ccuriqueo/vi-python:3.8 to include procps #3

@juanu

Description

@juanu

Bug

ABUNDANCE:GET_CIGAR (and potentially other processes using ccuriqueo/vi-python:3.8) fails with exit code 1 even though the Python script completes successfully.

Root cause: Nextflow's nxf_trace_linux() function — injected into every task's .command.run — requires the ps command to collect per-task CPU/memory metrics. The published image ccuriqueo/vi-python:3.8 was built before procps was added to the Dockerfile, so ps is absent and the tracer calls exit 1 immediately.

The relevant line in .command.run:

command -v ps &>/dev/null || { >&2 echo "Command 'ps' required by nextflow to collect task metrics cannot be found"; exit 1; }

Current workaround

The host /usr/bin/ps binary is bind-mounted read-only into the container via docker.runOptions in nextflow.config:

docker.runOptions = '-u $(id -u):$(id -g) -v /usr/bin/ps:/usr/bin/ps:ro'

This is fragile — it depends on the host ps being ABI-compatible with the container's libc.

Permanent fix

The containers/Dockerfile already includes procps. The image just needs to be rebuilt and pushed:

docker build -t ccuriqueo/vi-python:3.8 containers/
docker push ccuriqueo/vi-python:3.8

After pushing:

  • Remove the -v /usr/bin/ps:/usr/bin/ps:ro bind-mount from docker.runOptions in nextflow.config (both docker and standard profiles)
  • Verify: docker run --rm ccuriqueo/vi-python:3.8 which ps
  • Re-run the pipeline to confirm ABUNDANCE:GET_CIGAR completes successfully

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions