-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add controls for numpy version #678
Merged
robertbartel
merged 5 commits into
NOAA-OWP:master
from
robertbartel:i/control_numpy_ver/main
Jul 29, 2024
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6d02a07
Control the version of numpy used in workers.
robertbartel 22b308b
Update example.env with numpy version constraint.
robertbartel 318afe5
Update requirements files for numpy constraint.
robertbartel d302fc3
Roll back initial #678 changes.
robertbartel 74f7759
Use pip constraints file in ngen Dockerfile.
robertbartel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
### Constrain pip | ||
pip>=23.0,<23.1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is necessary after NOAA-OWP/t-route#804 was merged. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't have to be addressed here, just putting it on your radar @robertbartel! |
||
|
||
### Constrain numpy to < 2.0.0 due to current ngen compatibility issue | ||
numpy~=1.0 |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figure we could move the required python packages to a
requirements.txt
file (so,pip
,wheel
,packaging
, andnumpy
) and then create aconstraints.txt
that we use to enforce the allowed versions of the required and other packages inconstraints.txt
. Thoughts?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find! I think it's a good solution.
It's been a while since I've had to worry about this, but I believe that editing the
constraints.txt
and creating a new hash for the file would cause a newdocker build
to start at the line for theconstraints.txt
file , so I think we can be sure that a change there will just about always be reflected after a build.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't like the idea of coupling all the Python packages together in a requirements.txt, as I don't think that fits with how the Dockerfile is set up. It's totally fair to discuss whether that needs to change - e.g., should we really support building the image both with or without Python support (we don't really need numpy if in the without option)) - but it needs to be discussed separately.
But the
PIP_CONSTRAINT
and constraints.txt settings sound fine. Those alone should be sufficient to resolve the immediate issue.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@christophertubbs, you raise a good point I hadn't consider: depending on when the constraints.txt file is setup in the image that will once again have implications on build caching and efficiency.
That isn't an absolute blocker, but I want to think on it a little more to see if there's anyway to avoid that tradeoff.For the sake of getting the immediate issue fixed, I'm going to go ahead and prepare the changes to go this route, but I'm not sure I want it to be permanent just yet. But that can be spun off to a separate issue and dealt with later.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I agree. Im just talking about the required packages to build
ngen
with python support. So,numpy
,pip
,wheel
andpackaging
for now. It just seems like a nice place to keep those baseline required packages rather than inlining them in theDockerfile
.