|
|
|
|
@@ -15,9 +15,9 @@ RUN wget "https://github.com/yt-dlp/yt-dlp/releases/download/${YT_DLP_VERSION}/y
|
|
|
|
|
RUN chmod a+rx /usr/local/bin/yt-dlp
|
|
|
|
|
|
|
|
|
|
# Backend setup
|
|
|
|
|
FROM devopsworks/golang-upx:latest as backend-builder
|
|
|
|
|
FROM devopsworks/golang-upx:latest AS backend-builder
|
|
|
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
COPY ./backend /app
|
|
|
|
|
RUN go mod tidy
|
|
|
|
|
@@ -26,10 +26,10 @@ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o whishper . && \
|
|
|
|
|
RUN chmod a+rx whishper
|
|
|
|
|
|
|
|
|
|
# Frontend setup
|
|
|
|
|
FROM node:alpine as frontend
|
|
|
|
|
FROM node:alpine AS frontend
|
|
|
|
|
ENV PNPM_HOME="/pnpm"
|
|
|
|
|
ENV PATH="$PNPM_HOME:$PATH"
|
|
|
|
|
RUN corepack enable
|
|
|
|
|
RUN npm install --global pnpm@8.15.9
|
|
|
|
|
COPY ./frontend /app
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
@@ -42,7 +42,7 @@ ENV BODY_SIZE_LIMIT=0
|
|
|
|
|
RUN pnpm run build
|
|
|
|
|
|
|
|
|
|
# Base container
|
|
|
|
|
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 as base
|
|
|
|
|
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 AS base
|
|
|
|
|
|
|
|
|
|
ENV PYTHON_VERSION=3.10
|
|
|
|
|
|
|
|
|
|
@@ -52,9 +52,19 @@ RUN export DEBIAN_FRONTEND=noninteractive \
|
|
|
|
|
python${PYTHON_VERSION} \
|
|
|
|
|
python${PYTHON_VERSION}-venv \
|
|
|
|
|
python3-pip \
|
|
|
|
|
python${PYTHON_VERSION}-dev \
|
|
|
|
|
build-essential \
|
|
|
|
|
pkg-config \
|
|
|
|
|
ffmpeg \
|
|
|
|
|
libavcodec-dev \
|
|
|
|
|
libavdevice-dev \
|
|
|
|
|
libavfilter-dev \
|
|
|
|
|
libavformat-dev \
|
|
|
|
|
libavutil-dev \
|
|
|
|
|
libswresample-dev \
|
|
|
|
|
libswscale-dev \
|
|
|
|
|
curl wget xz-utils \
|
|
|
|
|
ffmpeg nginx supervisor \
|
|
|
|
|
nginx supervisor \
|
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
RUN ln -s -f /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 && \
|
|
|
|
|
@@ -64,7 +74,9 @@ RUN ln -s -f /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 && \
|
|
|
|
|
# Python service setup
|
|
|
|
|
COPY ./transcription-api /app/transcription
|
|
|
|
|
WORKDIR /app/transcription
|
|
|
|
|
RUN pip install -r requirements.txt && \
|
|
|
|
|
RUN python -m pip install --upgrade pip setuptools wheel "Cython<3" && \
|
|
|
|
|
pip install "av==10.0.0" --no-build-isolation && \
|
|
|
|
|
pip install -r requirements.txt && \
|
|
|
|
|
pip install python-multipart && \
|
|
|
|
|
pip3 install torch --index-url https://download.pytorch.org/whl/cu118
|
|
|
|
|
|
|
|
|
|
|