瀏覽代碼

fix python images problem: libGL.so.1

Tinger 2 年之前
父節點
當前提交
a34138b736
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      Dockerfile

+ 4 - 2
Dockerfile

@@ -6,7 +6,9 @@ COPY requires.txt .
 
 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.txt -i $tuna
+RUN pip install --no-cache-dir --upgrade pip -i $tuna && \
+ pip install --no-cache-dir -r requires.txt -i $tuna && \
+ apt update && apt install -y opencv-python-headless --no-install-recommends && \
+ apt-get clean && rm -rf /var/lib/apt/lists/*
 
 CMD ["gunicorn", "app:app", "-c", "gunicorn.conf"]