Compare commits

...

4 Commits

Author SHA1 Message Date
Coder
0e4f1c0f50 Upgrade pip in GPU image build 2026-09-02 18:01:17 +07:00
Coder
a0d076ee61 Pin Cython for PyAV 10 build 2026-09-02 17:14:28 +07:00
Coder
ce506eeeba Install PyAV build dependencies in GPU image 2026-09-02 17:03:34 +07:00
Coder
719f2f7c98 Fix pnpm installation in Docker builds 2026-09-02 16:48:15 +07:00
3 changed files with 21 additions and 9 deletions

View File

@@ -29,7 +29,7 @@ RUN chmod a+rx whishper
FROM node:alpine as frontend FROM node:alpine as frontend
ENV PNPM_HOME="/pnpm" ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH" ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable RUN npm install --global pnpm@8.15.9
COPY ./frontend /app COPY ./frontend /app
WORKDIR /app WORKDIR /app

View File

@@ -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 RUN chmod a+rx /usr/local/bin/yt-dlp
# Backend setup # 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 WORKDIR /app
COPY ./backend /app COPY ./backend /app
RUN go mod tidy 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 RUN chmod a+rx whishper
# Frontend setup # Frontend setup
FROM node:alpine as frontend FROM node:alpine AS frontend
ENV PNPM_HOME="/pnpm" ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH" ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable RUN npm install --global pnpm@8.15.9
COPY ./frontend /app COPY ./frontend /app
WORKDIR /app WORKDIR /app
@@ -42,7 +42,7 @@ ENV BODY_SIZE_LIMIT=0
RUN pnpm run build RUN pnpm run build
# Base container # 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 ENV PYTHON_VERSION=3.10
@@ -52,9 +52,19 @@ RUN export DEBIAN_FRONTEND=noninteractive \
python${PYTHON_VERSION} \ python${PYTHON_VERSION} \
python${PYTHON_VERSION}-venv \ python${PYTHON_VERSION}-venv \
python3-pip \ python3-pip \
python${PYTHON_VERSION}-dev \
build-essential \
pkg-config \
ffmpeg \ ffmpeg \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavformat-dev \
libavutil-dev \
libswresample-dev \
libswscale-dev \
curl wget xz-utils \ curl wget xz-utils \
ffmpeg nginx supervisor \ nginx supervisor \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
RUN ln -s -f /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 && \ 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 # Python service setup
COPY ./transcription-api /app/transcription COPY ./transcription-api /app/transcription
WORKDIR /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 && \ pip install python-multipart && \
pip3 install torch --index-url https://download.pytorch.org/whl/cu118 pip3 install torch --index-url https://download.pytorch.org/whl/cu118

View File

@@ -1,7 +1,7 @@
FROM node:alpine as base FROM node:alpine as base
ENV PNPM_HOME="/pnpm" ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH" ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable RUN npm install --global pnpm@8.15.9
COPY . /app COPY . /app
WORKDIR /app WORKDIR /app