Skip to content

Dockerfile is broken/outdated: runtime install requires bngsim (no Linux wheel) and bundles only legacy BNG2.pl #414

@wshlavacek

Description

@wshlavacek

Summary

The Dockerfile is stale and, as written, almost certainly cannot build end-to-end on Linux today. It was last "refreshed" cosmetically in dc6ad10 (Python 3.12 + BioNetGen 2.9.3), but that same commit made bngsim a hard dependency — which the container has no way to satisfy on Linux. It needs a real overhaul, not a touch-up. It is also not built or tested anywhere in CI, so it can rot silently.

How the Dockerfile works today

Three-stage build (Dockerfile):

  1. bionetgen-build — clones BioNetGen from GitHub at a pinned tag (BioNetGen-2.9.3) and compiles it from source (make_dist.pl --build).
  2. pybnf-build — builds the PyBNF wheel with pip wheel --no-deps.
  3. runtime (python:3.12-slim) — installs libgomp1 + perl, copies in the compiled BioNetGen and the wheel, then pip installs the wheel and sets BNGPATH/PATH.

Problems

1. Build-breaking: the runtime pip install requires bngsim, which has no Linux wheel

Dockerfile:72 runs pip install /tmp/wheels/*.whl without --no-deps, so pip resolves PyBNF's full dependency set — including the hard requirement bngsim>=0.5.0,<1 added in dc6ad10 ("Modernize packaging and require BNGsim"). bngsim is a private, macOS-only wheel with no public Linux build (see the notes in .github/workflows/integration.yml and .github/actions/setup-pybnf/action.yml: the hosted CI deliberately installs PyBNF without bngsim via --no-deps, "until bngsim ships Linux wheels"). The --build-arg PIP_EXTRA_INDEX_URL escape hatch only helps if such an index with a Linux bngsim wheel exists — it does not today.

Result: the runtime stage's pip install should fail to resolve bngsim on Linux.

2. Conceptual mismatch: the image bundles only the legacy BNG2.pl backend

The container compiles and ships legacy BioNetGen (BNG2.pl), but modern PyBNF centers on the bngsim simulation backend. Even if the install succeeded, the container would only offer the legacy backend. We should decide deliberately what a PyBNF container is for: a BNG2.pl-only legacy image, or a real bngsim image once Linux wheels exist.

3. Staleness

  • Pinned to Python 3.12; PyBNF now supports 3.13.
  • Pinned to BioNetGen 2.9.3 (fine to pin, but should be reviewed alongside the rest).
  • Not built or tested in CI → no guard against silent rot.

Suggested directions (pick one for the backend story)

  • A — BNG2.pl-only legacy image (works today): mirror the CI install — pip install --no-deps the wheel, then install the public runtime deps explicitly (the same list as .github/actions/setup-pybnf/action.yml), omitting bngsim. Document the image as the legacy BNG2.pl backend.
  • B — bngsim image (blocked): wait on / depend on bngsim Linux wheels, then make bngsim the backend and drop the from-source BNG2.pl build.

Acceptance criteria

  • docker build succeeds end-to-end on Linux (no private-index dependency on a nonexistent bngsim Linux wheel).
  • The image's intended backend (BNG2.pl vs bngsim) is documented and matches what's installed.
  • Python version reviewed against current support (3.13).
  • A CI job builds the image (at minimum on demand) so it can't rot silently again.

References

  • Dockerfile (esp. line 72, the runtime pip install)
  • dc6ad10 "Modernize packaging and require BNGsim" — made bngsim a hard dep and refreshed the Dockerfile
  • .github/actions/setup-pybnf/action.yml — the working bngsim-less install pattern to mirror
  • .github/workflows/integration.yml — "until bngsim ships Linux wheels"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions