Repository navigation
fix(docker): build Python node images without a requirements.txt - #647
Open
Siddhanthguptaa wants to merge 1 commit into
Open
Siddhanthguptaa wants to merge 1 commit into
Siddhanthguptaa wants to merge 1 commit into
Conversation
mkconcore's per-node docker build dir only has a requirements.txt when the node's .dir provides one, so `COPY requirements.txt .` failed for every generated Python node. Install numpy and pyzmq, and install requirements.txt only when it is present.
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.
Fixes #646
The generated
docker-<node>/build directory has norequirements.txtunless the node's.dirprovides one, soCOPY requirements.txt .inDockerfile.pyfailed for every Python node.Dockerfile.pynow installs numpy and pyzmq (all that concore.py/concore_base.py import) in their own layer beforeCOPY . ., so it is cached across nodes, and installsrequirements.txtonly if it is present. Building from the repo root (as the CI docker-build job does) still installsrequirements.txt. TheRUNis kept on one line so CRLF checkouts can't break a\continuation.Testing (Windows 11, Docker 29.4)
python mkconcore.py demo/sample.graphml demo out docker && cd out && ./buildfails atCOPY requirements.txt .../runcompletes the study (both nodes reach simtime 150, containers exit 0).Dockerfile.pychanges; mkconcore.py is untouched.Note: nodes that need more packages (e.g. scipy/matplotlib in
demo/plotym.py,ratc/*) get them by shipping arequirements.txtin the node's.dir, which is already copied into the build context.