Compare commits

..

3 Commits

Author SHA1 Message Date
937b6e1201 Update Dockerfile
All checks were successful
Docker Build and Publish / Build Docker image amd publish to Gitea (push) Successful in 16m20s
2025-09-02 20:53:52 -04:00
19fdd475a5 Update .github/workflows/docker-image.yml
All checks were successful
Docker Build and Publish / Build Docker image amd publish to Gitea (push) Successful in 19m34s
2025-09-02 20:32:09 -04:00
9e4c81439f Update .github/workflows/docker-image.yml 2025-09-02 20:30:02 -04:00
2 changed files with 45 additions and 39 deletions

View File

@@ -1,52 +1,58 @@
name: Build and publish on dockerhub
name: Docker Build and Publish
on:
schedule:
- cron: '30 6 * * SUN'
push:
branches: [ "main" ]
paths-ignore:
- '**/README.md'
pull_request:
branches: [ "main" ]
paths-ignore:
- '**/README.md'
workflow_dispatch:
jobs:
build:
## define job to build and publish docker image
build-and-push-docker-image:
name: Build Docker image amd publish to Gitea
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
## This is used to complete the identity challenge
## with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Check disk usage
run: df -h
- name: Remove unused Docker images
run: docker system prune -af
- name: Clean up temporary files
run: sudo rm -rf /tmp/*
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
${{ secrets.DOCKERHUB_USERNAME }}/rocm-wyoming-whisper
# generate Docker tags based on the following events/attributes
tags: |
type=raw,value={{date 'YYYY-MM-DD-HH.mm' tz='Europe/Rome'}}
- name: Set up Docker Buildx
## https://github.com/docker/build-push-action
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
## https://github.com/docker/login-action
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: git.sdgarren.com
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
## https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
provenance: false
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
#cache-from: type=gha
#cache-to: type=gha,mode=max
tags: |
git.sdgarren.com/scott/rocm-wyoming-whisper:latest
- name: Image digest
run: echo ${{ steps.build-and-push.outputs.digest }}

View File

@@ -7,7 +7,7 @@ RUN apt update && apt install -y --no-install-recommends libjpeg-dev python3-dev
rm -r /var/lib/apt/lists/*
RUN pip3 install --break-system-packages --no-cache-dir wheel setuptools
RUN pip3 install --break-system-packages --no-cache-dir --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/rocm6.2/
RUN pip3 install --break-system-packages --no-cache-dir --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.4/
RUN pip3 install --break-system-packages --no-cache-dir wyoming openai-whisper tokenizers