-
Notifications
You must be signed in to change notification settings - Fork 577
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fallback to regular if cog base image can't be determined and flag is…
… not explicitly set (#1872) * Add base-image to gitignore * This is a common artefact that we should prevent from being checked in. * Use a bool pointer as the cog base image flag * Bool pointer allows for a tri-state, true, false and not set. * Mark the default if the pointer is not set to true. * Use IsUsingCogBaseImage function rather than direct access to the pointer for boolean Resolution. * If the flag isn’t explicitly set, warn the user and fall back to building without a base image. * Add integration test for torch 1.13.0 fallback * Create a project with torch 1.13.0 * Do not explicitly specify using base images * Specify the schema so the schema is not inferred due to failing on non-GPU machines * Determine that the project builds successfully * Fix build CLI entry * Fix use of flag changed to determine explicit flag * Add a new function that determines whether the flag has been changed and outputs a bool pointer. * Add tests for explicitly set both in the true and false cases.
- Loading branch information
Showing
14 changed files
with
679 additions
and
59 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ pkg/dockerfile/embed/*.whl | |
docs/README.md | ||
docs/CONTRIBUTING.md | ||
venv | ||
base-image |
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
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
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
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
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
6 changes: 6 additions & 0 deletions
6
test-integration/test_integration/fixtures/torch-baseimage-project/cog.yaml
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,6 @@ | ||
build: | ||
gpu: true | ||
python_version: "3.9" | ||
python_packages: | ||
- "torch==1.13.0" | ||
predict: "predict.py:Predictor" |
Oops, something went wrong.