fix(docker): repair the Dockerfile as a legacy BNG2.pl image (#414)#445
Merged
Conversation
The runtime stage ran `pip install` on the PyBNF wheel WITHOUT --no-deps, so pip re-resolved the full dependency set including `bngsim>=0.5.0,<1` -- a private, macOS-only wheel with no public Linux build. The image could not build end-to-end on Linux. Direction A (legacy BNG2.pl image, works today): - Install PyBNF's public runtime deps explicitly, then `pip install --no-deps` the wheel, mirroring .github/actions/setup-pybnf. bngsim is intentionally omitted; PyBNF imports cleanly without it and uses the BNG2.pl backend. - Replace the from-source BioNetGen compile with the official prebuilt Linux tarball (BNG2.pl + bundled run_network/NFsim binaries) -- faster, no autoconf/cmake/ninja toolchain. - Default to Python 3.13 (now supported). - Document the image's backend (legacy BNG2.pl) in the header; drop the stale bngsim private-index escape hatch. Add .github/workflows/docker.yml to build and smoke-test the image (on demand, and on Dockerfile/pyproject changes) so it can't rot silently again. Closes #414
`bash -lc` re-sources /etc/profile, which resets PATH to the Debian default and drops the image's BNGPATH entry, so `command -v BNG2.pl` failed even though BNG2.pl (0755) is correctly installed and on PATH. Use a non-login `bash -c` that inherits the container's ENV PATH.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the broken/stale
Dockerfile(#414) via Direction A — a legacy BNG2.pl image that builds end-to-end on Linux today.What was broken
The runtime stage ran
pip installon the PyBNF wheel without--no-deps, so pip re-resolved PyBNF's full dependency set — includingbngsim>=0.5.0,<1, a private macOS-only wheel with no public Linux build. The image could not build on Linux.Changes
pip install --no-depsthe wheel — mirroring.github/actions/setup-pybnf.bngsimis intentionally omitted; PyBNF imports cleanly without it and falls back to the BNG2.pl backend.make_dist.pl --build) with the official prebuilt Linux tarball (BioNetGen-2.9.3-linux.tar.gz: BNG2.pl + bundledrun_network/NFsim). Faster, no autoconf/cmake/ninja toolchain..github/workflows/docker.ymlbuilds + smoke-tests the image (on demand, and onDockerfile/pyproject.tomlchanges) so it can't rot silently again.Acceptance criteria (#414)
docker buildsucceeds end-to-end on Linux (no dependency on a nonexistent bngsim Linux wheel) — verified by thedockerworkflow on this PR.Closes #414