Spaces:
Configuration error
Configuration error
Fedir Zadniprovskyi
commited on
Commit
·
aa5390b
1
Parent(s):
aada575
feat: add gha workflow for building and pushing docker images
Browse files- .dockerignore +2 -0
- .github/workflows/docker-build-and-push.yaml +51 -0
- .gitignore +2 -0
- flake.nix +1 -0
.dockerignore
CHANGED
|
@@ -10,3 +10,5 @@ flake.lock
|
|
| 10 |
.task
|
| 11 |
Taskfile.yaml
|
| 12 |
README.md
|
|
|
|
|
|
|
|
|
| 10 |
.task
|
| 11 |
Taskfile.yaml
|
| 12 |
README.md
|
| 13 |
+
.secrets
|
| 14 |
+
.ruff_cache
|
.github/workflows/docker-build-and-push.yaml
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: docker-build-and-push
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- "master"
|
| 7 |
+
# TODO: releases
|
| 8 |
+
|
| 9 |
+
jobs:
|
| 10 |
+
docker:
|
| 11 |
+
runs-on: ubuntu-22.04
|
| 12 |
+
strategy:
|
| 13 |
+
matrix:
|
| 14 |
+
dockerfile: [Dockerfile.cuda, Dockerfile.cpu]
|
| 15 |
+
include:
|
| 16 |
+
- dockerfile: Dockerfile.cuda
|
| 17 |
+
tag-prefix: cuda
|
| 18 |
+
- repository-name: Dockerfile.cpu
|
| 19 |
+
tag-prefix: cpu
|
| 20 |
+
steps:
|
| 21 |
+
- uses: actions/checkout@v4
|
| 22 |
+
- name: Login to Docker Hub
|
| 23 |
+
uses: docker/login-action@v3
|
| 24 |
+
with:
|
| 25 |
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
| 26 |
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
| 27 |
+
- id: meta
|
| 28 |
+
uses: docker/metadata-action@v5
|
| 29 |
+
with:
|
| 30 |
+
images: |
|
| 31 |
+
fedirz/speaches
|
| 32 |
+
# https://github.com/docker/metadata-action?tab=readme-ov-file#flavor-input
|
| 33 |
+
flavor: |
|
| 34 |
+
latest=false
|
| 35 |
+
prefix=${{ matrix.tag-prefix }}
|
| 36 |
+
tags: |
|
| 37 |
+
type=sha
|
| 38 |
+
- name: Set up Docker Buildx
|
| 39 |
+
uses: docker/setup-buildx-action@v3
|
| 40 |
+
- name: Build and push
|
| 41 |
+
uses: docker/build-push-action@v5
|
| 42 |
+
with:
|
| 43 |
+
context: .
|
| 44 |
+
file: ${{ matrix.dockerfile }}
|
| 45 |
+
# push: true
|
| 46 |
+
# TODO: multi-platform
|
| 47 |
+
# platforms: linux/amd64,linux/arm64
|
| 48 |
+
tags: ${{ steps.meta.outputs.tags }}
|
| 49 |
+
# TODO: cache
|
| 50 |
+
# cache-from: type=registry,ref=fedirz/speaches:buildcache
|
| 51 |
+
# cache-to: type=registry,ref=fedirz/speaches:buildcache,mode=max
|
.gitignore
CHANGED
|
@@ -3,3 +3,5 @@ __pycache__
|
|
| 3 |
tests/data
|
| 4 |
.direnv
|
| 5 |
.task
|
|
|
|
|
|
|
|
|
| 3 |
tests/data
|
| 4 |
.direnv
|
| 5 |
.task
|
| 6 |
+
.secrets
|
| 7 |
+
.ruff_cache
|
flake.nix
CHANGED
|
@@ -18,6 +18,7 @@
|
|
| 18 |
default = pkgs.mkShell {
|
| 19 |
nativeBuildInputs = with pkgs; [
|
| 20 |
(with python311Packages; huggingface-hub)
|
|
|
|
| 21 |
ffmpeg-full
|
| 22 |
go-task
|
| 23 |
lsyncd
|
|
|
|
| 18 |
default = pkgs.mkShell {
|
| 19 |
nativeBuildInputs = with pkgs; [
|
| 20 |
(with python311Packages; huggingface-hub)
|
| 21 |
+
act
|
| 22 |
ffmpeg-full
|
| 23 |
go-task
|
| 24 |
lsyncd
|