123456789101112131415161718 |
- FROM python:3.10
- WORKDIR /code
- COPY ./requirements.txt /code/requirements.txt
- COPY ./app /code/app
- COPY .env_pro /code/.env
- RUN pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple/
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
- RUN mkdir -p /code/ml_models
- ENV PYTHONPATH=/code
- ENV TZ=Asia/Shanghai
- EXPOSE 8002
- CMD ["uvicorn", "app.main:app", "--root-path", "/env-py", "--log-level", "info", "--host", "0.0.0.0", "--port", "8002"]
|