Skip to content

Commit

Permalink
feat: switch to ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedir Zadniprovskyi authored and fedirz committed Jan 10, 2025
1 parent 669a858 commit b445e23
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/docker-build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ on:
release:
types: [published]
env:
IMAGE_NAME: fedirz/faster-whisper-server
REGISTRY: ghcr.io
FULL_IMAGE_NAME: ghcr.io/fedirz/faster-whisper-server
jobs:
docker:
runs-on: ubuntu-latest
Expand All @@ -26,7 +27,7 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
${{ env.IMAGE_NAME }}
${{ env.FULL_IMAGE_NAME }}
# https://github.com/docker/metadata-action?tab=readme-ov-file#flavor-input
flavor: |
suffix=${{ matrix.tag-suffix}},onlatest=true
Expand All @@ -38,8 +39,9 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
Expand All @@ -52,5 +54,5 @@ jobs:
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max
cache-from: type=registry,ref=${{ env.FULL_IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.FULL_IMAGE_NAME }}:buildcache,mode=max
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ARG BASE_IMAGE=nvidia/cuda:12.6.3-cudnn-runtime-ubuntu24.04
# hadolint ignore=DL3006
FROM ${BASE_IMAGE}
LABEL org.opencontainers.image.source="https://github.com/fedirz/faster-whisper-server"
LABEL org.opencontainers.image.licenses="MIT"
# `ffmpeg` is installed because without it `gradio` won't work with mp3(possible others as well) files
# hadolint ignore=DL3008
RUN apt-get update && \
Expand Down

0 comments on commit b445e23

Please sign in to comment.