Dockerfile 730 B

12345678910111213141516171819202122
  1. FROM python:3.9
  2. RUN apt-get update
  3. RUN apt-get install -y vim wget curl sngrep
  4. RUN pip3 install swig cython pip setuptools --upgrade
  5. WORKDIR /code
  6. ADD . .
  7. # pjsua2
  8. RUN cd /code/pjproject && chmod +x configure aconfigure && ./configure CFLAGS="-fPIC" && make dep && make
  9. RUN cd /code/pjproject/pjsip-apps/src/swig/python && make && make install
  10. # pyESL
  11. RUN cd /code/python-ESL-1.4.18 && python setup.py install
  12. # nls
  13. RUN cd /code/alibabacloud-nls-python-sdk-1.0.2 && pip install -r requirements.txt && python setup.py install
  14. # 安装项目依赖
  15. RUN pip install -r requirements.txt
  16. RUN pip install flask_sqlalchemy
  17. EXPOSE 8000
  18. CMD ["gunicorn", "-w 1", "-b 0.0.0.0:8000", "src.core.server:app"]
  19. #CMD ["tail", "-f", "/dev/null"]