Skip to content

Commit

Permalink
优化dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
alisen39 committed Oct 27, 2021
1 parent bfa6c00 commit e04e788
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
FROM python:3.7-slim

RUN sed -i 's#http://deb.debian.org#https://mirrors.163.com#g' /etc/apt/sources.list
RUN apt update && apt install -y libglib2.0-dev libsm6 libxrender1 libxext-dev supervisor build-essential \
&& rm -rf /var/lib/apt/lists/*

RUN /usr/local/bin/python -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple
COPY ./requirements.txt ./TrWebOCR/
RUN pip3 install -r ./TrWebOCR/requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
COPY . ./TrWebOCR

RUN python3 ./TrWebOCR/install.py
RUN sed -i 's#http://deb.debian.org#https://mirrors.163.com#g' /etc/apt/sources.list \
&& apt update && apt install -y libglib2.0-dev libsm6 libxrender1 libxext-dev supervisor build-essential \
&& rm -rf /var/lib/apt/lists/* \
&& /usr/local/bin/python -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple \
&& pip3 install -r ./TrWebOCR/requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ \
&& python3 ./TrWebOCR/install.py
EXPOSE 8089
CMD ["supervisord","-c","/TrWebOCR/supervisord.conf"]

0 comments on commit e04e788

Please sign in to comment.