animeAcartoonServer / Dockerfile
DarkMo0o's picture
Update Dockerfile
2bd44a6 verified
FROM python:3.10-slim
ENV PYTHONUNBUFFERED=1
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
libgl1 \
libomp5 libomp-dev \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
libgomp1 \
libvulkan1 \
vulkan-tools \
mesa-vulkan-drivers \
git \
wget \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
# 1. numpy ุฃูˆู„ุงู‹
RUN pip install --no-cache-dir numpy==1.24.3
# 2. torch
RUN pip install --no-cache-dir torch==2.0.1 torchvision==0.15.2
# 3. basicsr ุจุฏูˆู† build isolation
RUN pip install --no-cache-dir --no-build-isolation basicsr==1.4.2
# 4. ุจุงู‚ูŠ ุงู„ู…ูƒุชุจุงุช
RUN pip install --no-cache-dir \
flask==3.0.0 \
facexlib==0.3.0 \
realesrgan==0.3.0 \
opencv-python-headless==4.8.1.78 \
Pillow==10.1.0 \
gfpgan==1.3.8 \
scikit-image==0.22.0 \
scikit-learn==1.3.2 \
requests==2.31.0 \
gunicorn==21.2.0
# 5. force-reinstall numpy ููŠ ุงู„ู†ู‡ุงูŠุฉ ู„ู…ู†ุน ุฃูŠ ู…ูƒุชุจุฉ ู…ู† ุชุบูŠูŠุฑู‡
RUN pip install --no-cache-dir --force-reinstall numpy==1.24.3
COPY app.py .
EXPOSE 7860
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "300", "--workers", "1", "app:app"]