Spaces:
Running
on
Zero
Running
on
Zero
FROM python:3.10-slim | |
# 安装 git 和其他必要工具 | |
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | |
WORKDIR /app | |
COPY requirements.txt requirements.txt | |
# 安装 Python 依赖项 | |
RUN pip install --upgrade pip && pip install -r requirements.txt | |
COPY . . | |
EXPOSE 5000 | |
# 设置缓存目录环境变量 | |
ENV TRANSFORMERS_CACHE=/tmp/.cache | |
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"] | |