Skip to content
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 a test stage to our Docker Build and Push workflow #39

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

DhanshreeA
Copy link
Member

Added two new steps to the workflow, namely, buildForTest, and testBuiltImage.

The buildForTest step only builds an amd64 image with the latest tag since we test this image through the ersilia CLI which only looks for the latest tag.

The testBuiltImage serves the newly built model image and tests it against a simple input. Then I use jq to count the fields within the model outcome followed by checking for null values in the output. If there are any null values within the output this test fails and the model push will not succeed.

Upon success of this test, the subsequent build stage will only build the arm64 image and reuse the previously built amd64 image and push them both to DockerHub.

Added two new steps to the workflow, namely, buildForTest, and testBuiltImage. 

The `buildForTest` step only builds an amd64 image with the latest tag since we test this image through the ersilia CLI which only looks for the latest tag. 

The `testBuiltImage` serves the newly built model image and tests it against a simple input. Then I use jq to count the fields within the model outcome followed by checking for null values in the output. If there are any null values within the output this test fails and the model push will not succeed. 

Upon success of this test, the subsequent build stage will only build the arm64 image and reuse the previously built amd64 image and push them both to DockerHub.
@DhanshreeA DhanshreeA linked an issue Apr 8, 2024 that may be closed by this pull request
@DhanshreeA DhanshreeA merged commit cd8f941 into main Apr 8, 2024
3 checks passed
@DhanshreeA DhanshreeA deleted the 38-add-test-stage-to-docker-build-and-push-step branch April 8, 2024 10:02
DhanshreeA added a commit that referenced this pull request Apr 8, 2024
Added two new steps to the workflow, namely, buildForTest, and testBuiltImage.

The `buildForTest` step only builds an amd64 image with the latest tag since we test this image through the ersilia CLI which only looks for the latest tag.

The `testBuiltImage` serves the newly built model image and tests it against a simple input. Then I use jq to count the fields within the model outcome followed by checking for null values in the output. If there are any null values within the output this test fails and the model push will not succeed.

Upon success of this test, the subsequent build stage will only build the arm64 image and reuse the previously built amd64 image and push them both to DockerHub.

Also moved the installation of ersilia a few steps up to use within the testBuiltImage stage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add test stage to docker build and push step
1 participant