Dockerfile 762 B

12345678910111213141516171819202122232425
  1. FROM tiangolo/gunicorn:latest
  2. RUN apt-get update && \
  3. apt-get install -y vim wget curl sngrep tcpflow tcpdump
  4. # 设置工作目录
  5. WORKDIR /home/model-server/
  6. # 复制 requirements.txt 到镜像中
  7. COPY ./requirements.txt /code/requirements.txt
  8. # 复制 model 和 m3e 到镜像内对应路径
  9. ADD ./models /home/model-server/
  10. ADD ./m3e /home/model-server/m3e/
  11. # 安装依赖
  12. RUN pip install -r /code/requirements.txt
  13. EXPOSE 50072
  14. #CMD ["gunicorn", "-w 1", "-b 0.0.0.0:8000", "src.core.server:app"]
  15. #CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:8000", "--worker-class", "eventlet", "src.core.server:app"]
  16. #CMD ["/bin/sh", "-c", "cd /code/api && python AiBot.py"]
  17. CMD ["/bin/sh", "-c", "python /home/model-server/web.py"]
  18. #CMD ["tail", "-f", "/dev/null"]