-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from huggingface/build_images_and_run_tests_001
Restructure workflow files
- Loading branch information
Showing
6 changed files
with
95 additions
and
40 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build images and run tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
dockerfile_path: | ||
description: 'Path to the Dockerfile' | ||
type: string | ||
required: true | ||
docker_image_tag: # It should be in the form as mentioned in our internal docs. Just pass insensitive data here like huggingface-text-generation-inference-${accelerator}.${version}:latest | ||
description: 'Docker Image Tag' | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
build-push-image: | ||
uses: ./.github/workflows/build_push_image.yml | ||
secrets: inherit | ||
with: | ||
region: us-central1 | ||
dockerfile_path: ${{ inputs.dockerfile_path }} | ||
docker_image_tag: ${{ inputs.docker_image_tag }} | ||
gcp_artifact_registry_repository: deep-learning-images | ||
GCP_PROJECT_ID: ${{ vars.GCP_PROJECT_ID }} | ||
|
||
model_test: | ||
needs: build-push-image | ||
uses: ./.github/workflows/test_model.yml | ||
secrets: inherit | ||
with: | ||
region: us-central1 | ||
docker_image_tag: ${{ inputs.docker_image_tag }} | ||
gcp_artifact_registry_repository: deep-learning-images | ||
GCP_PROJECT_ID: ${{ vars.GCP_PROJECT_ID }} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build and Push to GCP Artifact Registry Resuable Workflow | ||
name: Build and push images | ||
|
||
on: | ||
workflow_call: | ||
|
@@ -19,16 +19,13 @@ on: | |
description: 'GCP Artifact Registry Repository' | ||
type: string | ||
required: true | ||
secrets: | ||
GCP_SERVICE_ACCOUNT_JSON_KEY: | ||
description: 'Service Account' | ||
required: true | ||
GCP_PROJECT_ID: | ||
description: 'GCP Project ID' | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
build-push-image-job: | ||
build-push-image: | ||
name: Build and Push Docker Image to GCP Artifact Registry | ||
runs-on: [intel-cpu, 8-cpu, ci] | ||
steps: | ||
|
@@ -55,7 +52,5 @@ jobs: | |
uses: 'docker/[email protected]' | ||
with: | ||
file: ${{ inputs.dockerfile_path }} # Read more about it here: https://github.com/marketplace/actions/build-and-push-docker-images#customizing | ||
tags: ${{ inputs.region }}-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ inputs.gcp_artifact_registry_repository }}/${{ inputs.docker_image_tag }} | ||
tags: ${{ inputs.region }}-docker.pkg.dev/${{ inputs.GCP_PROJECT_ID }}/${{ inputs.gcp_artifact_registry_repository }}/${{ inputs.docker_image_tag }} | ||
push: true | ||
|
||
|
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,20 @@ | ||
name: Build images and run tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- build_images_and_run_tests_* | ||
|
||
jobs: | ||
build-push-image: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
torch: [2.1] | ||
transformers: [4.38.1] | ||
python: [310] | ||
uses: ./.github/workflows/build_and_test.yml | ||
secrets: inherit | ||
with: | ||
dockerfile_path: ./containers/pytorch/training/gpu/${{ matrix.torch }}/transformers/${{ matrix.transformers }}/py${{ matrix.python }}/Dockerfile | ||
docker_image_tag: huggingface-pytorch-training-gpu-${{ matrix.torch }}.transformers.${{ matrix.transformers }}.py${{ matrix.python }}:latest |
This file was deleted.
Oops, something went wrong.
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