Tinger 2 роки тому
батько
коміт
46f0a1cf30
2 змінених файлів з 5 додано та 5 видалено
  1. 4 4
      Dockerfile
  2. 1 1
      requires.cpu

+ 4 - 4
Dockerfile

@@ -1,15 +1,15 @@
-FROM python:3.9
+FROM nvidia/cuda
 
 WORKDIR /srv
 
-COPY requires.cpu .
+COPY requires.gpu .
 
 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 update && apt install -y python3 --no-install-recommends && \
  apt-get clean && rm -rf /var/lib/apt/lists/*
 
 CMD ["gunicorn", "app:app"]

+ 1 - 1
requires.cpu

@@ -1,4 +1,4 @@
-paddlepaddle==2.4.2
+paddlepaddle-gpu==2.4.2
 
 opencv-python==4.6.0.66
 pyclipper==1.3.0.post4