Skip to content

Commit

Permalink
Separated jobs for 2 ray images
Browse files Browse the repository at this point in the history
  • Loading branch information
jomariya23156 committed Apr 1, 2024
1 parent 3fc70c0 commit ca1931d
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 18 deletions.
68 changes: 50 additions & 18 deletions .github/workflows/build_push_docker_hub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,14 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
# Hardcoded all build-args here, couldn't find a proper way
# to put this into matrix
## for amd64 (x86_64) please leave ARCH_TRAILING_IMG_NAME empty like
## ARCH_TRAILING_IMG_NAME=
build-args: |
AIRFLOW_HOME=/opt/airflow
MLFLOW_ARTIFACT_ROOT=/storage/mlruns
build_and_push_ray_images_only: # Job for building and pushing the images
name: Build and Push Ray Images
build_and_push_ray_arm64: # Job for building and pushing the images
name: Build and Push Ray arm64 Image
runs-on: ubuntu-latest
needs: shared_steps # Dependency on the shared steps
strategy:
matrix:
image: [
{ name: ray, context: ./services/ray, file: ./services/ray/Dockerfile, platform: linux/arm64 },
{ name: ray, context: ./services/ray, file: ./services/ray/Dockerfile, platform: linux/amd64 }
]
steps:
- name: Download repository artifact
uses: actions/download-artifact@v3
Expand All @@ -96,23 +88,63 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for ${{ matrix.image.name }} Docker
- name: Extract metadata (tags, labels) for ray Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ariya23156/sfmlops-${{ matrix.image.name }}
images: ariya23156/sfmlops-ray

- name: Build and push ${{ matrix.image.name }} Docker image
- name: Build and push ray Docker image
uses: docker/build-push-action@v3
with:
context: ${{ matrix.image.context }}
file: ${{ matrix.image.file }}
platforms: ${{ matrix.image.platform }}
context: ./services/ray
file: ./services/ray/Dockerfile
platforms: linux/arm64
push: true
tags: ariya23156/sfmlops-${{ matrix.image.name }}:latest-${{ matrix.image.platform }}
tags: ariya23156/sfmlops-ray:latest-arm64
labels: ${{ steps.meta.outputs.labels }}
# Hardcoded all build-args here, couldn't find a proper way
# to put this into matrix
## for amd64 (x86_64) please leave ARCH_TRAILING_IMG_NAME empty like
## ARCH_TRAILING_IMG_NAME=
build-args: "ARCH_TRAILING_IMG_NAME=${{ matrix.platform == 'linux/amd64' ? '' : '-aarch64' }}"
build-args: |
ARCH_TRAILING_IMG_NAME=-aarch64
build_and_push_ray_amd64: # Job for building and pushing the images
name: Build and Push Ray arm64 Image
runs-on: ubuntu-latest
needs: shared_steps # Dependency on the shared steps
steps:
- name: Download repository artifact
uses: actions/download-artifact@v3
with:
name: repository

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for ray Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ariya23156/sfmlops-ray

- name: Build and push ray Docker image
uses: docker/build-push-action@v3
with:
context: ./services/ray
file: ./services/ray/Dockerfile
platforms: linux/amd64
push: true
tags: ariya23156/sfmlops-ray:latest-amd64
labels: ${{ steps.meta.outputs.labels }}
# Hardcoded all build-args here, couldn't find a proper way
# to put this into matrix
build-args: |
ARCH_TRAILING_IMG_NAME=
9 changes: 9 additions & 0 deletions sfmlops-helm/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
containerBaseImage:
dataProducer:
trainingService:
forecastService:
mlflow:
ray:
webUi:


kafkaReleaseName: kafka-release
kafkaNamespace: kafka

Expand Down

0 comments on commit ca1931d

Please sign in to comment.