Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/github-release-dh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Build & Push Docker Image (on Release)

on:
release:
types: [published] # triggers when a release is published
workflow_dispatch: # allows manual runs from the Actions tab
types: [published]
workflow_dispatch:

permissions:
contents: read
Expand All @@ -25,14 +25,12 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# ---- Docker Hub login (maintainer must add secrets) ----
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Extract tags and labels from the release
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
Expand All @@ -44,13 +42,13 @@ jobs:
type=semver,pattern={{version}},enable={{is_default_branch}}
type=semver,pattern={{major}}.{{minor}},enable={{is_default_branch}}

- name: Build & Push (multi-arch)
- name: Build & Push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/github-release-dh_develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build & Push Docker Image (Develop Branch)

on:
push:
branches:
- develop
workflow_dispatch:
inputs:
branch:
description: 'Branch to build from'
required: false
default: 'develop'

permissions:
contents: read
packages: write

jobs:
build-and-push:
runs-on: ubuntu-24.04

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch || 'develop' }}

- name: Set up QEMU (multi-arch)
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
netplexflix/uldas
tags: |
type=raw,value=develop
type=sha,prefix=develop-

- name: Build & Push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
28 changes: 25 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,23 @@ ENV PIP_NO_CACHE_DIR=1

RUN apt-get update && apt-get install -y --no-install-recommends \
python3.11 \
python3.11-dev \
python3-pip \
build-essential \
ffmpeg \
mkvtoolnix \
tesseract-ocr \
tesseract-ocr-eng \
gosu \
# Required for PyAV
libavformat-dev \
libavcodec-dev \
libavdevice-dev \
libavutil-dev \
libswscale-dev \
libswresample-dev \
libavfilter-dev \
pkg-config \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Expand All @@ -26,9 +37,20 @@ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 \

WORKDIR /app

# Install dependencies
# Upgrade pip first
RUN python -m pip install --upgrade pip setuptools wheel

# Install PyTorch with CUDA support
RUN pip install torch --index-url https://download.pytorch.org/whl/cu124

# Install PyAV (required by faster-whisper)
RUN pip install av

# Install faster-whisper and remaining dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt
RUN pip install faster-whisper>=1.2.0 && \
pip install PyYAML>=6.0.2 requests>=2.32.4 packaging>=21.3 \
psutil>=7.0.0 langdetect>=1.0.8 pytesseract>=0.3.13 pillow>=11.3.0

COPY ULDAS.py .
RUN mkdir -p /app/config /media
Expand All @@ -41,4 +63,4 @@ ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
ENV PUID=0
ENV PGID=0

ENTRYPOINT ["/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]