Dockerfile 927 B

1234567891011121314151617181920212223242526272829303132
  1. FROM python:3.10-slim AS base
  2. LABEL maintainer="xujiawei@cocorobo.cc"
  3. RUN apt-get update \
  4. && apt-get install -y --no-install-recommends bash curl wget vim libmagic-dev \
  5. && apt-get autoremove \
  6. && rm -rf /var/lib/apt/lists/*
  7. RUN pip install --no-cache-dir poetry -i https://pypi.tuna.tsinghua.edu.cn/simple \
  8. && poetry config virtualenvs.create false
  9. #COPY poetry.lock /env/poetry.lock
  10. COPY pyproject.toml /env/pyproject.toml
  11. #RUN poetry config repositories.pypi https://pypi.tuna.tsinghua.edu.cn/simple
  12. #RUN cd /env && poetry lock --no-update && poetry install --only main
  13. #RUN cd /env && poetry install --only main
  14. RUN cd /env && poetry lock && poetry install --only main
  15. #RUN pip install openai==1.27.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
  16. EXPOSE 8086
  17. WORKDIR /app
  18. COPY . /app
  19. COPY docker/entrypoint.sh /entrypoint.sh
  20. RUN chmod +x /entrypoint.sh
  21. ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]