-
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
Restructure dependencies / image building #104
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,227 @@ | |||
# |
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'm unsure if this file should be committed to git. I think it shouldn't, but would be curious to hear what others think.
For now, I've included it so people can see the output.
@@ -0,0 +1,20 @@ | |||
#!/bin/bash | |||
# Usage: ./scripts/generate-requirements [optional paths to additional requirements.txt] |
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.
This argument parsing could be improved:
- It could maybe take an output file / files for where to write stuff.
- It doesn't use any of the fancy argument parsing stuff from the other scripts for things like help, etc.
Test failure was from (some tests) requiring the |
Description
Updates pctasks' packaging to facilitate easier image building for downstream tasks. Currently, building a Docker image for a dataset requires copy-pasting the "base" dockerfile around, which is cumbersome.
A possible alternative was to have the dataset Dockerfile use a
FROM pctasks-base
to add its additional dependencies. But this would require multiplepip
solves / installs, which can be challenging to ensure you end up with a consistent, valid environment. It's best to do that all at once if possible.So this adds a new
scripts/generate-requirements
that usespip-compile
to find all the requirements.To help avoid breaking the cache too many times, we split that output into dependencies and
pctasks
modules.Now our dataset tasks just need to build an image using the same definition. See https://github.com/microsoft/planetary-computer-tasks/compare/tom/fix/packaging-dev?expand=1#diff-49a5b2bd27cc6579e5bc27e44e1b033d8239d83131d28ce42b89a3d26013974aR29
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist:
Please delete options that are not relevant.