diff --git a/.github/workflows/github-release-dh.yml b/.github/workflows/github-release-dh.yml index cca9689..388c053 100644 --- a/.github/workflows/github-release-dh.yml +++ b/.github/workflows/github-release-dh.yml @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/github-release-dh_develop.yml b/.github/workflows/github-release-dh_develop.yml new file mode 100644 index 0000000..0bb9af5 --- /dev/null +++ b/.github/workflows/github-release-dh_develop.yml @@ -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 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 67f4665..939ffca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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/* @@ -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 @@ -41,4 +63,4 @@ ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility ENV PUID=0 ENV PGID=0 -ENTRYPOINT ["/entrypoint.sh"] +ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file