Refine form validation and update Docker configuration

This commit is contained in:
Paper-Dragon
2025-07-09 13:34:26 +08:00
parent 880f745718
commit dc29319a3e
2 changed files with 24 additions and 15 deletions

View File

@@ -1,15 +1,16 @@
FROM nvidia/cuda:12.6.0-cudnn-runtime-ubuntu24.04
FROM nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04
RUN apt update && \
apt install -y ffmpeg python3-pip && \
apt clean all
apt clean all && \
rm -rf /var/lib/apt/lists/*
# 设置 Hugging Face 镜像源环境变量
ENV HF_ENDPOINT=https://hf-mirror.com
WORKDIR /app
COPY ./backend /app
RUN pip install --no-cache-dir -i https://pypi.mirrors.ustc.edu.cn/simple -r requirements.txt --break-system-packages
RUN pip install --no-cache-dir -i https://pypi.mirrors.ustc.edu.cn/simple transformers[torch]>=4.23 --break-system-packages
RUN pip install --no-cache-dir -i https://pypi.mirrors.ustc.edu.cn/simple -r requirements.txt
RUN pip install --no-cache-dir -i https://pypi.mirrors.ustc.edu.cn/simple 'transformers[torch]>=4.23'
CMD ["python3", "main.py"]