Spaces:
Running
on
Zero
Running
on
Zero
File size: 426 Bytes
6e3fb11 0242d61 d543720 0242d61 d543720 0242d61 6e3fb11 0242d61 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
FROM python:3.8-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"]
|