Spaces:
Running
Running
FROM python:3.10-slim | |
# 显式声明环境变量(与huggingface配置同步) | |
ENV TRANSFORMERS_CACHE=/model-cache \ | |
PYTHONUNBUFFERED=1 | |
# 创建缓存目录 | |
RUN mkdir -p /model-cache && chmod 777 /model-cache | |
# 安装依赖 | |
RUN apt-get update && apt-get install -y gcc python3-dev | |
WORKDIR /app | |
COPY . . | |
RUN pip install --no-cache-dir -r requirements.txt | |
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "app:app"] |