Dockerfile 334 B

123456789101112131415
  1. FROM python:3.11-slim
  2. WORKDIR /app
  3. COPY requirements.txt .
  4. RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn
  5. COPY . .
  6. RUN mkdir -p data || true && chmod 755 data
  7. EXPOSE 8000
  8. CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]