Update Dockerfile

This commit is contained in:
lyc8503 2022-04-18 00:07:22 +08:00 committed by GitHub
parent a2d402d496
commit 85c8d2dc31
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"]