Skip to content

Commit

Permalink
Update image builds
Browse files Browse the repository at this point in the history
  • Loading branch information
nstogner committed Oct 17, 2024
1 parent b4c5e53 commit cc0dc14
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 2 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/build-push-huggingface-model-loader.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build and Push huggingface-model-loader Docker image
on:
push:
branches:
- main
tags:
- "v*.*.*"
paths-ignore:
- '**/README.md'
pull_request:

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
REGISTRY: ghcr.io
IMAGE_NAME: substratusai/huggingface-model-loader

jobs:
kubeai:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
if: github.event_name == 'push'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to docker.io
if: github.event_name == 'push'
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: ./components/huggingface-model-loader
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Push Docker image
name: Build and Push kubeai Docker image
on:
push:
branches:
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/how-to/build-models-into-containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Build and push image. Note: building (downloading base image & model) and pushin

```bash
git clone https://github.com/substratusai/kubeai
cd ./kubeai/images/ollama-builtin
cd ./kubeai/examples/ollama-builtin

docker build --build-arg MODEL_URL=$MODEL_URL -t $IMAGE .
docker push $IMAGE
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit cc0dc14

Please sign in to comment.