feat: 更新Dockerfile为新版接口

This commit is contained in:
nl 2022-03-21 22:13:56 +08:00
parent 48ff4ef7a6
commit 08a63f92c7
1 changed files with 5 additions and 5 deletions

View File

@ -30,16 +30,16 @@ RUN apt update && apt install -y python3 python3-pip
RUN pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple RUN pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip3 install wave scipy matplotlib tensorflow-cpu==2.5.2 numpy==1.19.2 requests RUN pip3 install wave scipy matplotlib tensorflow-cpu==2.5.2 numpy==1.19.2 requests flask waitress
RUN echo $'cd /asrt_server \n python3 asrserver.py' > /asrt_server/start.sh && chmod +x /asrt_server/start.sh RUN echo $'cd /asrt_server \n python3 asrserver_http.py' > /asrt_server/start.sh && chmod +x /asrt_server/start.sh
# refer: https://docs.docker.com/engine/reference/builder/#expose # refer: https://docs.docker.com/engine/reference/builder/#expose
EXPOSE 20000/tcp EXPOSE 20001/tcp
ENTRYPOINT ["/bin/bash", "/asrt_server/start.sh"] ENTRYPOINT ["/bin/bash", "/asrt_server/start.sh"]
# https://docs.docker.com/engine/reference/commandline/build/#options # https://docs.docker.com/engine/reference/commandline/build/#options
# docker build --progress plain --rm --build-arg TAG=1.1.0 --tag asrt/api_server:1.1.0 . # docker build --progress plain --rm --build-arg TAG=1.1.1 --tag asrt/api_server:1.1.1 .
# https://docs.docker.com/engine/reference/commandline/run/#options # https://docs.docker.com/engine/reference/commandline/run/#options
# docker run --rm -it -p 20000:20000 --name asrt -d asrt/api_server:1.1.0 # docker run --rm -it -p 20001:20001 --name asrt -d asrt/api_server:1.1.1