enhancer / Dockerfile
lucky0146's picture
Update Dockerfile
afa0f7c verified
raw
history blame contribute delete
917 Bytes
FROM python:3.10-slim
# System dependencies
RUN apt-get update && apt-get install -y \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
libgl1-mesa-glx \
git \
&& rm -rf /var/lib/apt/lists/*
# Clone CodeFormer
RUN git clone https://github.com/sczhou/CodeFormer
WORKDIR /CodeFormer
# Create required files in correct locations
RUN echo "# CodeFormer" > README.md && \
mkdir -p basicsr && \
echo "1.3.2" > basicsr/version
# Install core dependencies
RUN pip install --upgrade pip && \
pip install -r requirements.txt && \
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
# Install BasicSR
RUN cd basicsr && \
pip install -e . && \
cd ..
# Download models
RUN python scripts/download_pretrained_models.py facelib
RUN python scripts/download_pretrained_models.py CodeFormer
# Copy app file
COPY app.py .
CMD ["python", "app.py"]