123456789101112131415161718192021222324 |
- FROM python:3.9
- RUN apt-get update && \
- apt-get install -y vim wget curl sngrep && \
- pip3 install swig cython pip setuptools --upgrade
- WORKDIR /code
- ADD . .
- # pjsua2
- RUN cd /code/pjproject && chmod +x configure aconfigure && ./configure CFLAGS="-fPIC" && make dep && make
- RUN cd /code/pjproject/pjsip-apps/src/swig/python && make && make install
- # pyESL
- RUN cd /code/python-ESL-1.4.18 && python setup.py install
- # nls
- RUN cd /code/alibabacloud-nls-python-sdk-1.0.2 && pip install -r requirements.txt && python setup.py install
- # 安装项目依赖
- RUN pip install -r requirements.txt
- EXPOSE 8000
- #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 ["sh", "-c", "gunicorn -w 1 -b 0.0.0.0:8090 src.core.server:app & gunicorn -w 1 -b 0.0.0.0:8091 --worker-class gevent src.core.socket_server:app & wait"]
- #CMD ["tail", "-f", "/dev/null"]
|