Remove old requirements #115
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
name: Publish Docker image | |
on: | |
push: | |
branches: [main] | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
build_and_push: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- llamacpp_image: "full" | |
platforms: "linux/amd64,linux/arm64/v8" | |
tag_name: "cpu" | |
MODEL_URL: "None" | |
QUANT_TYPE: "None" | |
- llamacpp_image: "full-cuda" | |
platforms: "linux/amd64" | |
tag_name: "cuda" | |
MODEL_URL: "None" | |
QUANT_TYPE: "None" | |
# Proof of concept for building images with LLMs baked in | |
#- llamacpp_image: "full" | |
# platforms: "linux/amd64,linux/arm64/v8" | |
# tag_name: "mistral7b-openorca-cpu" | |
# MODEL_URL: "TheBloke/Mistral-7B-OpenOrca-GGUF" | |
# QUANT_TYPE: "Q4_K_M" | |
#- llamacpp_image: "full-cuda" | |
# platforms: "linux/amd64" | |
# tag_name: "mistral7b-openorca-cuda" | |
# MODEL_URL: "TheBloke/Mistral-7B-OpenOrca-GGUF" | |
# QUANT_TYPE: "Q4_K_M" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: ${{ matrix.platforms }} | |
push: true | |
tags: | | |
${{ vars.DOCKERHUB_USERNAME }}/local-llm:${{ matrix.tag_name }} | |
${{ vars.DOCKERHUB_USERNAME }}/local-llm:${{ matrix.tag_name }}-${{ github.sha }} | |
ghcr.io/josh-xt/local-llm:${{ matrix.tag_name }} | |
ghcr.io/josh-xt/local-llm:${{ matrix.tag_name }}-${{ github.sha }} | |
build-args: | | |
LLAMACPP_IMAGE=${{ matrix.llamacpp_image }} | |
MODEL_URL=${{ matrix.MODEL_URL }} | |
QUANT_TYPE=${{ matrix.QUANT_TYPE }} | |
- name: Docker Hub Description | |
uses: peter-evans/[email protected] | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
repository: ${{ vars.DOCKERHUB_USERNAME }}/local-llm |