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