Dockerfile 427 B

1234567891011121314151617
  1. FROM python:3.10-slim
  2. WORKDIR /code
  3. COPY ./requirements.txt /code/requirements.txt
  4. COPY ./app /code/app
  5. COPY .env_pro /code/.env
  6. RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ && \
  7. mkdir -p /code/ml_models
  8. ENV PYTHONPATH=/code
  9. ENV TZ=Asia/Shanghai
  10. EXPOSE 8002
  11. CMD ["uvicorn", "app.main:app", "--log-level", "info", "--host", "0.0.0.0", "--port", "8002"]