Merge pull request #8 from lyc8503/main

优化 Dockerfile
This commit is contained in:
Sml2h3 2022-04-21 10:00:58 +08:00 committed by GitHub
commit 610b44d9fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
FROM python:3.8-buster
FROM python:3.8-slim-buster
RUN mkdir /app
@ -10,8 +10,8 @@ RUN cd /app \
&& pip3 install --no-cache-dir -r requirements.txt --extra-index-url https://pypi.douban.com/simple/ \
&& rm -rf /tmp/* && rm -rf /root/.cache/* \
&& sed -i 's#http://deb.debian.org#http://mirrors.aliyun.com/#g' /etc/apt/sources.list\
&& apt-get --allow-releaseinfo-change update && apt install libgl1-mesa-glx -y
&& apt-get --allow-releaseinfo-change update && apt install libgl1-mesa-glx libglib2.0-0 -y
WORKDIR /app
CMD ["python3", "ocr_server.py", "--port", "9898", "--ocr", "--det"]
CMD ["python3", "ocr_server.py", "--port", "9898", "--ocr", "--det"]