-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update README.md * Update subgen.py * Fix detect language flow for non-bazarr * Bump version * Fix pyav error catch * Fix for LRC putting newlines inappropriately * Hopefully fix blank exceptions next() may have been exhausted in previous version too early. Trying a list instead and other catches. * version bump because I'm an idiot * Take 2 on has_subtitle_language_in_file * Added plex ability to queue future episodes. PLEX_QUEUE_NEXT_EPISODE and PLEX_QUEUE_SERIES * Update README.md * Removed debugging statements * Fix subtitle naming for translate Always default the subtitle name to eng, unless namesublang set to something else. * Fix semicolon because i'm editing in a browser on my phone... * Fix subtitle naming logic * Version bump and fix default actions if translating to english * Update launcher.py * Fixed deprecated call to transcribe_stable -> transcribe * Clarify Bazarr setup * Update README.md * Potential fix for garbage collector * Fix LRC generation not being skipped properly when it already exists. * Move LRC check elsewhere * somehow deleted the name of a function... * Add Afar * Fix Afar typo... * Fix for monitor files * Properly de-duplicate the queue and processing * Define the queue properly... * Fix where task_queue is defined. * Don't purge model with active transcriptions. * Add mka audio extension. * Clean up some logging More to come... * Double log line removed * renamed function and cleaned up readability * fix for lrc files * Attempt to make a ctranslate2 image with compute 5 capability Should support older GPUs * Create build_GPU_Compute5.yml * Update build_GPU_Compute5.yml * Update Dockerfile.compute5 * Update Dockerfile.compute5 * Update build_GPU_Compute5.yml * Update build_GPU_Compute5.yml * Update build_GPU_Compute5.yml * Create Dockerfile.compute5.0 * Update build_GPU_Compute5.yml * Update Dockerfile.compute5.0 * Delete Dockerfile.compute5.0 * Delete Dockerfile.compute5 * Delete .github/workflows/build_GPU_Compute5.yml * attempt to make the image smaller * Update Dockerfile.cpu alpine doesn't have torch * Update Dockerfile.cpu * Update Dockerfile.cpu * Update Dockerfile.cpu * Update Dockerfile * Update Dockerfile * Update Dockerfile.cpu * Update Dockerfile * Update Dockerfile.cpu * Update Dockerfile.cpu * Update Dockerfile * Update Dockerfile * Update Dockerfile.cpu * Update Dockerfile * Update Dockerfile * Update Dockerfile.cpu * Update Dockerfile * Print out which file we're actively working on and updated Queue functions * Remove unused function * Update calver.yml
- Loading branch information
Showing
7 changed files
with
426 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,41 @@ | ||
# Stage 1: Builder | ||
FROM nvidia/cuda:12.3.2-cudnn9-runtime-ubuntu22.04 AS builder | ||
|
||
WORKDIR /subgen | ||
|
||
# Install system dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
python3 \ | ||
python3-pip \ | ||
ffmpeg \ | ||
git \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy requirements and install Python dependencies | ||
COPY requirements.txt . | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Copy application code | ||
COPY . . | ||
|
||
# Stage 2: Runtime | ||
FROM nvidia/cuda:12.3.2-cudnn9-runtime-ubuntu22.04 | ||
|
||
WORKDIR /subgen | ||
|
||
ADD https://raw.githubusercontent.com/McCloudS/subgen/main/requirements.txt /subgen/requirements.txt | ||
# Copy necessary files from the builder stage | ||
COPY --from=builder /subgen/launcher.py . | ||
COPY --from=builder /subgen/subgen.py . | ||
COPY --from=builder /subgen/language_code.py . | ||
COPY --from=builder /usr/local/lib/python3.10/dist-packages /usr/local/lib/python3.10/dist-packages | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
python3 \ | ||
python3-pip \ | ||
ffmpeg \ | ||
git \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& pip3 install -r requirements.txt | ||
# Install runtime dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
ffmpeg \ | ||
python3 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV PYTHONUNBUFFERED=1 | ||
|
||
ADD https://raw.githubusercontent.com/McCloudS/subgen/main/launcher.py /subgen/launcher.py | ||
ADD https://raw.githubusercontent.com/McCloudS/subgen/main/subgen.py /subgen/subgen.py | ||
ADD https://raw.githubusercontent.com/McCloudS/subgen/main/language_code.py /subgen/language_code.py | ||
|
||
CMD [ "bash", "-c", "python3 -u launcher.py" ] | ||
# Set command to run the application | ||
CMD ["python3", "launcher.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,32 @@ | ||
FROM python:3.11-slim-bullseye | ||
# === Stage 1: Build dependencies and install packages === | ||
FROM python:3.11-slim-bullseye AS builder | ||
|
||
WORKDIR /subgen | ||
|
||
ADD https://raw.githubusercontent.com/McCloudS/subgen/main/requirements.txt /subgen/requirements.txt | ||
# Install required build dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
ffmpeg \ | ||
git \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
python3 \ | ||
python3-pip \ | ||
ffmpeg \ | ||
git \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& pip install -r requirements.txt | ||
# Copy and install dependencies | ||
COPY requirements.txt . | ||
RUN pip install --no-cache-dir --prefix=/install torch torchaudio --extra-index-url https://download.pytorch.org/whl/cpu && pip install --no-cache-dir --prefix=/install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu | ||
|
||
ENV PYTHONUNBUFFERED=1 | ||
# === Stage 2: Create a minimal runtime image === | ||
FROM python:3.11-slim-bullseye AS runtime | ||
|
||
ADD https://raw.githubusercontent.com/McCloudS/subgen/main/launcher.py /subgen/launcher.py | ||
ADD https://raw.githubusercontent.com/McCloudS/subgen/main/subgen.py /subgen/subgen.py | ||
ADD https://raw.githubusercontent.com/McCloudS/subgen/main/language_code.py /subgen/language_code.py | ||
WORKDIR /subgen | ||
|
||
# Install only required runtime dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
ffmpeg \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy only necessary files from builder stage | ||
COPY --from=builder /install /usr/local | ||
|
||
# Copy source code | ||
COPY launcher.py subgen.py language_code.py /subgen/ | ||
|
||
CMD [ "bash", "-c", "python3 -u launcher.py" ] | ||
CMD ["python3", "launcher.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.