Spaces:
Configuration error
Configuration error
Fedir Zadniprovskyi
commited on
Commit
·
760dfe6
1
Parent(s):
8c12cdc
ci: update how images are tagged, enable multi-arch builds
Browse files- .github/workflows/docker-build-and-push.yaml +16 -13
- Taskfile.yaml +3 -0
.github/workflows/docker-build-and-push.yaml
CHANGED
|
@@ -8,6 +8,9 @@ on:
|
|
| 8 |
release:
|
| 9 |
types: [published]
|
| 10 |
|
|
|
|
|
|
|
|
|
|
| 11 |
jobs:
|
| 12 |
docker:
|
| 13 |
runs-on: ubuntu-22.04
|
|
@@ -21,23 +24,24 @@ jobs:
|
|
| 21 |
tag-suffix: -cpu
|
| 22 |
steps:
|
| 23 |
- uses: actions/checkout@v4
|
| 24 |
-
- name: Login to Docker Hub
|
| 25 |
-
uses: docker/login-action@v3
|
| 26 |
-
with:
|
| 27 |
-
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
| 28 |
-
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
| 29 |
- id: meta
|
| 30 |
uses: docker/metadata-action@v5
|
| 31 |
with:
|
| 32 |
images: |
|
| 33 |
-
|
| 34 |
# https://github.com/docker/metadata-action?tab=readme-ov-file#flavor-input
|
| 35 |
flavor: |
|
| 36 |
-
|
| 37 |
-
suffix=${{ matrix.tag-suffix}}
|
| 38 |
tags: |
|
| 39 |
-
type=semver,pattern={{
|
| 40 |
type=semver,pattern={{major}}.{{minor}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
- name: Set up Docker Buildx
|
| 42 |
uses: docker/setup-buildx-action@v3
|
| 43 |
- name: Build and push
|
|
@@ -46,8 +50,7 @@ jobs:
|
|
| 46 |
context: .
|
| 47 |
file: ${{ matrix.dockerfile }}
|
| 48 |
push: true
|
| 49 |
-
|
| 50 |
-
# platforms: linux/amd64,linux/arm64
|
| 51 |
tags: ${{ steps.meta.outputs.tags }}
|
| 52 |
-
cache-from: type=registry,ref
|
| 53 |
-
cache-to: type=registry,ref
|
|
|
|
| 8 |
release:
|
| 9 |
types: [published]
|
| 10 |
|
| 11 |
+
env:
|
| 12 |
+
IMAGE_NAME: fedirz/faster-whisper-server
|
| 13 |
+
|
| 14 |
jobs:
|
| 15 |
docker:
|
| 16 |
runs-on: ubuntu-22.04
|
|
|
|
| 24 |
tag-suffix: -cpu
|
| 25 |
steps:
|
| 26 |
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
- id: meta
|
| 28 |
uses: docker/metadata-action@v5
|
| 29 |
with:
|
| 30 |
images: |
|
| 31 |
+
${{ env.IMAGE_NAME }}
|
| 32 |
# https://github.com/docker/metadata-action?tab=readme-ov-file#flavor-input
|
| 33 |
flavor: |
|
| 34 |
+
suffix=${{ matrix.tag-suffix}},onlatest=true
|
|
|
|
| 35 |
tags: |
|
| 36 |
+
type=semver,pattern={{major}}.{{minor}}.{{patch}}
|
| 37 |
type=semver,pattern={{major}}.{{minor}}
|
| 38 |
+
type=semver,pattern={{major}}
|
| 39 |
+
type=sha
|
| 40 |
+
- name: Login to Docker Hub
|
| 41 |
+
uses: docker/login-action@v3
|
| 42 |
+
with:
|
| 43 |
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
| 44 |
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
| 45 |
- name: Set up Docker Buildx
|
| 46 |
uses: docker/setup-buildx-action@v3
|
| 47 |
- name: Build and push
|
|
|
|
| 50 |
context: .
|
| 51 |
file: ${{ matrix.dockerfile }}
|
| 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
|
Taskfile.yaml
CHANGED
|
@@ -20,6 +20,9 @@ tasks:
|
|
| 20 |
- Dockerfile.*
|
| 21 |
- faster_whisper_server/*.py
|
| 22 |
sync: lsyncd lsyncd.conf
|
|
|
|
|
|
|
|
|
|
| 23 |
# Python's urllib3 takes forever when ipv6 is enabled
|
| 24 |
# https://support.nordvpn.com/hc/en-us/articles/20164669224337-How-to-disable-IPv6-on-Linux
|
| 25 |
disable-ipv6: sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 && sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
|
|
|
|
| 20 |
- Dockerfile.*
|
| 21 |
- faster_whisper_server/*.py
|
| 22 |
sync: lsyncd lsyncd.conf
|
| 23 |
+
cii:
|
| 24 |
+
cmds:
|
| 25 |
+
- act --rm --action-offline-mode --secret-file .secrets {{.CLI_ARGS}}
|
| 26 |
# Python's urllib3 takes forever when ipv6 is enabled
|
| 27 |
# https://support.nordvpn.com/hc/en-us/articles/20164669224337-How-to-disable-IPv6-on-Linux
|
| 28 |
disable-ipv6: sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 && sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
|