Fedir Zadniprovskyi commited on
Commit
b445e23
·
1 Parent(s): 669a858

feat: switch to ghcr.io

Browse files
.github/workflows/docker-build-and-push.yaml CHANGED
@@ -7,7 +7,8 @@ on:
7
  release:
8
  types: [published]
9
  env:
10
- IMAGE_NAME: fedirz/faster-whisper-server
 
11
  jobs:
12
  docker:
13
  runs-on: ubuntu-latest
@@ -26,7 +27,7 @@ jobs:
26
  uses: docker/metadata-action@v5
27
  with:
28
  images: |
29
- ${{ env.IMAGE_NAME }}
30
  # https://github.com/docker/metadata-action?tab=readme-ov-file#flavor-input
31
  flavor: |
32
  suffix=${{ matrix.tag-suffix}},onlatest=true
@@ -38,8 +39,9 @@ jobs:
38
  - name: Login to Docker Hub
39
  uses: docker/login-action@v3
40
  with:
41
- username: ${{ secrets.DOCKERHUB_USERNAME }}
42
- password: ${{ secrets.DOCKERHUB_TOKEN }}
 
43
  - name: Set up Docker Buildx
44
  uses: docker/setup-buildx-action@v3
45
  - name: Build and push
@@ -52,5 +54,5 @@ jobs:
52
  push: true
53
  platforms: linux/amd64,linux/arm64
54
  tags: ${{ steps.meta.outputs.tags }}
55
- cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
56
- cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max
 
7
  release:
8
  types: [published]
9
  env:
10
+ REGISTRY: ghcr.io
11
+ FULL_IMAGE_NAME: ghcr.io/fedirz/faster-whisper-server
12
  jobs:
13
  docker:
14
  runs-on: ubuntu-latest
 
27
  uses: docker/metadata-action@v5
28
  with:
29
  images: |
30
+ ${{ env.FULL_IMAGE_NAME }}
31
  # https://github.com/docker/metadata-action?tab=readme-ov-file#flavor-input
32
  flavor: |
33
  suffix=${{ matrix.tag-suffix}},onlatest=true
 
39
  - name: Login to Docker Hub
40
  uses: docker/login-action@v3
41
  with:
42
+ registry: ${{ env.REGISTRY }}
43
+ username: ${{ github.actor }}
44
+ password: ${{ secrets.GITHUB_TOKEN }}
45
  - name: Set up Docker Buildx
46
  uses: docker/setup-buildx-action@v3
47
  - name: Build and push
 
54
  push: true
55
  platforms: linux/amd64,linux/arm64
56
  tags: ${{ steps.meta.outputs.tags }}
57
+ cache-from: type=registry,ref=${{ env.FULL_IMAGE_NAME }}:buildcache
58
+ cache-to: type=registry,ref=${{ env.FULL_IMAGE_NAME }}:buildcache,mode=max
Dockerfile CHANGED
@@ -2,6 +2,7 @@ ARG BASE_IMAGE=nvidia/cuda:12.6.3-cudnn-runtime-ubuntu24.04
2
  # hadolint ignore=DL3006
3
  FROM ${BASE_IMAGE}
4
  LABEL org.opencontainers.image.source="https://github.com/fedirz/faster-whisper-server"
 
5
  # `ffmpeg` is installed because without it `gradio` won't work with mp3(possible others as well) files
6
  # hadolint ignore=DL3008
7
  RUN apt-get update && \
 
2
  # hadolint ignore=DL3006
3
  FROM ${BASE_IMAGE}
4
  LABEL org.opencontainers.image.source="https://github.com/fedirz/faster-whisper-server"
5
+ LABEL org.opencontainers.image.licenses="MIT"
6
  # `ffmpeg` is installed because without it `gradio` won't work with mp3(possible others as well) files
7
  # hadolint ignore=DL3008
8
  RUN apt-get update && \