File size: 917 Bytes
fd5e38d
 
a1ba885
fd5e38d
ad6ba1c
 
 
 
fd5e38d
ef536c5
fd5e38d
 
97d5c17
 
ef56943
8206d0c
afa0f7c
 
 
 
97d5c17
afa0f7c
fd5e38d
ef56943
a1ba885
fd5e38d
ad6ba1c
fd5e38d
a1ba885
fd5e38d
 
ad6ba1c
fd5e38d
a1ba885
fd5e38d
ef56943
fd5e38d
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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"]