This commit is contained in:
t0is 2025-03-20 15:13:12 +01:00
parent 21e51a4a39
commit 7ba8b80347
4 changed files with 853 additions and 24 deletions

View File

@ -1,17 +1,35 @@
FROM python:3.9-slim FROM nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04
WORKDIR /app # Set noninteractive mode to avoid tzdata and other interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
# Install prerequisites for adding repositories
RUN apt-get update && apt-get install -y --no-install-recommends \
software-properties-common \
&& rm -rf /var/lib/apt/lists/*
# Add deadsnakes PPA for Python 3.9
RUN add-apt-repository ppa:deadsnakes/ppa -y
# Install Python 3.9, python3.9-distutils, pip, and other dependencies
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y ffmpeg jq curl unzip && \ apt-get install -y python3.9 python3.9-distutils python3-pip ffmpeg jq curl unzip && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Copy requirements file (if you have one) and install Python dependencies # Set python3.9 as the default python3 and upgrade pip
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 && \
pip3 install --no-cache-dir --upgrade pip
# Set the working directory
WORKDIR /app
# Copy requirements file and install Python dependencies
# (Ensure your requirements.txt includes the correct CUDA-enabled PyTorch version,
# for example: torch==1.13.1+cu113 -f https://download.pytorch.org/whl/torch_stable.html)
COPY requirements.txt . COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt RUN pip3 install --no-cache-dir -r requirements.txt
# Download and install TwitchDownloaderCLI (adjust version if necessary)
# Download TwitchDownloaderCLI (adjust version if necessary)
RUN curl -L https://github.com/lay295/TwitchDownloader/releases/download/1.55.2/TwitchDownloaderCLI-1.55.2-Linux-x64.zip \ RUN curl -L https://github.com/lay295/TwitchDownloader/releases/download/1.55.2/TwitchDownloaderCLI-1.55.2-Linux-x64.zip \
-o /tmp/TwitchDownloaderCLI.zip && \ -o /tmp/TwitchDownloaderCLI.zip && \
unzip /tmp/TwitchDownloaderCLI.zip -d /tmp && \ unzip /tmp/TwitchDownloaderCLI.zip -d /tmp && \
@ -19,10 +37,10 @@ RUN curl -L https://github.com/lay295/TwitchDownloader/releases/download/1.55.2/
chmod +x /usr/local/bin/TwitchDownloaderCLI && \ chmod +x /usr/local/bin/TwitchDownloaderCLI && \
rm /tmp/TwitchDownloaderCLI.zip rm /tmp/TwitchDownloaderCLI.zip
# Copy application code, the entrypoint script, and channels.json # Copy application code and other necessary files
COPY main.py . COPY main.py .
COPY channels.json . COPY channels.json .
COPY cookies.txt . COPY cookies.txt .
# Default command # Default command to run your application
CMD ["python", "-u", "main.py"] CMD ["python3", "-u", "main.py"]

View File

@ -1,14 +1,477 @@
services: services:
scanner_cyr: scanner_amfikcz:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment: environment:
- CHANNEL_NAME=cyr - CHANNEL_NAME=amfikcz
- CHANNEL_LANGUAGE=en - CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=8 - TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false - TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false - CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov - TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es - TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:latest image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_andrej_kalinin:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=andrej_kalinin
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_artix:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=artix
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_astatoro:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=astatoro
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_avatar0fwar:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=avatar0fwar
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_batmanova:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=batmanova
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_bladeito:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=bladeito
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_claina:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=claina
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_cyr:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=cyr
- CHANNEL_LANGUAGE=en
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_domovnikofc:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=domovnikofc
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_elbowcz146:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=elbowcz146
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_fluffcz:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=fluffcz
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_flyguncz:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=flyguncz
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_freezecz:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=freezecz
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_heddi2k:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=heddi2k
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_herdyn:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=herdyn
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_himtheoldboy:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=himtheoldboy
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_holasovic:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=holasovic
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_hornakcz:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=hornakcz
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_jorantheviking:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=jorantheviking
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes: volumes:
- /shared/transcriptor/clips:/app/clips - /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods - /shared/transcriptor/vods:/app/vods
@ -17,15 +480,166 @@ services:
- /shared/transcriptor/models:/app/models - /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts - /shared/transcriptor/transcripts:/app/transcripts
scanner_khalamity: scanner_khalamity:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment: environment:
- CHANNEL_NAME=khalamity - CHANNEL_NAME=khalamity
- CHANNEL_LANGUAGE=en - CHANNEL_LANGUAGE=en
- TIMEDELTA_DAYS=8 - TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false - TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false - CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov - TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es - TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:latest image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_kokiii_:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=kokiii_
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_liveoliverr:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=liveoliverr
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_love_stanislove:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=love_stanislove
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_marty_vole:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=marty_vole
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_mullersie:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=mullersie
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_patrikturi:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=patrikturi
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes: volumes:
- /shared/transcriptor/clips:/app/clips - /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods - /shared/transcriptor/vods:/app/vods
@ -34,15 +648,190 @@ services:
- /shared/transcriptor/models:/app/models - /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts - /shared/transcriptor/transcripts:/app/transcripts
scanner_rachtaz: scanner_rachtaz:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment: environment:
- CHANNEL_NAME=rachtaz - CHANNEL_NAME=rachtaz
- CHANNEL_LANGUAGE=en - CHANNEL_LANGUAGE=en
- TIMEDELTA_DAYS=8 - TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false - TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false - CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov - TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es - TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:latest image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_resttpowered:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=resttpowered
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_spajkk:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=spajkk
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_styko:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=styko
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_tensterakdary:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=tensterakdary
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_tom__mm:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=tom__mm
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_vvudy:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=vvudy
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes:
- /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods
- /shared/transcriptor/audio:/app/audio
- /shared/transcriptor/chat:/app/chat
- /shared/transcriptor/models:/app/models
- /shared/transcriptor/transcripts:/app/transcripts
scanner_xnapycz:
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
count: all
driver: nvidia
environment:
- CHANNEL_NAME=xnapycz
- CHANNEL_LANGUAGE=cs
- TIMEDELTA_DAYS=10
- TIMEDELTA_DAYS_EXACT=false
- CLIP_CREATE_FROM_CHAT=false
- TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov
- TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es
image: t0is/madmonq-transcriptor-image:cuda
volumes: volumes:
- /shared/transcriptor/clips:/app/clips - /shared/transcriptor/clips:/app/clips
- /shared/transcriptor/vods:/app/vods - /shared/transcriptor/vods:/app/vods

View File

@ -1,6 +1,15 @@
import json import json
import yaml import yaml
# Custom list class to force inline (flow style) YAML formatting
class InlineList(list):
pass
def inline_list_representer(dumper, data):
return dumper.represent_sequence('tag:yaml.org,2002:seq', data, flow_style=True)
yaml.add_representer(InlineList, inline_list_representer)
# Load the channels from channels.json # Load the channels from channels.json
with open("channels.json", "r") as f: with open("channels.json", "r") as f:
channels = json.load(f) channels = json.load(f)
@ -13,24 +22,37 @@ compose = {
for channel in channels: for channel in channels:
service_name = f"scanner_{channel['name']}" service_name = f"scanner_{channel['name']}"
compose["services"][service_name] = { compose["services"][service_name] = {
"image": "t0is/madmonq-transcriptor-image:latest", "image": "t0is/madmonq-transcriptor-image:cuda",
"environment": [ "environment": [
f"CHANNEL_NAME={channel['name']}", f"CHANNEL_NAME={channel['name']}",
f"CHANNEL_LANGUAGE={channel['language']}", f"CHANNEL_LANGUAGE={channel['language']}",
"TIMEDELTA_DAYS=8", "TIMEDELTA_DAYS=10",
"TIMEDELTA_DAYS_EXACT=false", "TIMEDELTA_DAYS_EXACT=false",
"CLIP_CREATE_FROM_CHAT=false", "CLIP_CREATE_FROM_CHAT=false",
"TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov", "TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov",
"TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es" "TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es"
], ],
"volumes": [ "volumes": [
"/shared/transcriptor/clips:/app/clips", # Shared clips folder on the host "/shared/transcriptor/clips:/app/clips",
"/shared/transcriptor/vods:/app/vods", "/shared/transcriptor/vods:/app/vods",
"/shared/transcriptor/audio:/app/audio", "/shared/transcriptor/audio:/app/audio",
"/shared/transcriptor/chat:/app/chat", "/shared/transcriptor/chat:/app/chat",
"/shared/transcriptor/models:/app/models", "/shared/transcriptor/models:/app/models",
"/shared/transcriptor/transcripts:/app/transcripts" "/shared/transcriptor/transcripts:/app/transcripts"
] ],
"deploy": {
"resources": {
"reservations": {
"devices": [
{
"driver": "nvidia",
"count": "all",
"capabilities": InlineList(["gpu"])
}
]
}
}
}
} }
# Write the docker-compose file # Write the docker-compose file

View File

@ -161,7 +161,7 @@ def transcribe_audio_fast(audio_file, model_name, language, vod_id):
return segments_data return segments_data
# Initialize the model and transcribe (passing language if provided) # Initialize the model and transcribe (passing language if provided)
model_fast = WhisperModel("large-v3-turbo", device="auto", compute_type="int8", download_root="/app/models") model_fast = WhisperModel("large-v3-turbo", device="cuda", download_root="/app/models")
segments, info = model_fast.transcribe(audio_file, language=language) segments, info = model_fast.transcribe(audio_file, language=language)
print("faster_whisper -- Detected language '%s' with probability %f" % (info.language, info.language_probability)) print("faster_whisper -- Detected language '%s' with probability %f" % (info.language, info.language_probability))