pyvideotrans / Dockerfile
mortimerme's picture
Update Dockerfile
7bea8df verified
Raw
History Blame Contribute Delete
1.46 kB
# ============================================================
# pyVideoTrans WebUI Dockerfile (CPU ไธ“็”จ็‰ˆ)
# ============================================================
FROM python:3.10-slim AS final-base
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
ENV GRADIO_SERVER_NAME="0.0.0.0"
ENV GRADIO_SERVER_PORT=7860
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV FONTCONFIG_PATH=/etc/fonts
WORKDIR /app
# ๅฎ‰่ฃ…ๅฟ…่ฆ็š„็ณป็ปŸไพ่ต–ๅ’Œ้™ๆ€ ffmpeg
RUN apt-get update && apt-get install -y --no-install-recommends \
fontconfig \
fonts-noto-cjk \
fonts-liberation \
fonts-dejavu \
wget \
xz-utils \
git \
libglib2.0-0 \
libgl1 \
libsm6 \
libxext6 \
libxrender-dev \
libxkbcommon-x11-0 \
libdbus-1-3 \
libsndfile1 \
python3-dev \
rubberband-cli \
libsndfile1-dev \
&& wget -q https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz \
&& tar -Jxf ffmpeg-release-amd64-static.tar.xz \
&& cp ffmpeg-*-static/ffmpeg /usr/local/bin/ \
&& cp ffmpeg-*-static/ffprobe /usr/local/bin/ \
&& rm -rf ffmpeg-* \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# ๅ…‹้š†ๆบ็ 
RUN git clone -b dev https://github.com/jianchang512/pyvideotrans.git .
# ๅฎ‰่ฃ… CPU ็‰ˆไพ่ต–
RUN echo ">>> CPU" && uv pip install --system -r pyproject.toml --all-extras
RUN rm -rf /root/.cache/uv /tmp/*
EXPOSE 7860
CMD ["python", "webui.py"]