Dockerfile 469 B

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