Bläddra i källkod

fix libGL for cv2

Tinger 2 år sedan
förälder
incheckning
51bc28e941
1 ändrade filer med 4 tillägg och 1 borttagningar
  1. 4 1
      Dockerfile

+ 4 - 1
Dockerfile

@@ -7,6 +7,9 @@ COPY requires.cpu .
 ARG tuna=https://pypi.tuna.tsinghua.edu.cn/simple
 
 RUN pip install --no-cache-dir --upgrade pip -i $tuna && \
- pip install --no-cache-dir -r requires.cpu -i $tuna
+ pip install --no-cache-dir -r requires.gpu -i $tuna && \
+ sed -i "s@http://deb.debian.org@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list && \
+ apt update && apt install -y libgl1-mesa-glx --no-install-recommends && \
+ apt-get clean && rm -rf /var/lib/apt/lists/*
 
 CMD ["gunicorn", "app:app"]