File size: 781 Bytes
e1ae826
 
 
 
 
 
 
56d5f4e
e1ae826
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.11-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
    git cmake build-essential libopenblas-dev && \
    rm -rf /var/lib/apt/lists/*

# Build stable-diffusion.cpp from source (latest, with Anima support)
RUN git clone --depth 1 --recurse-submodules https://github.com/leejet/stable-diffusion.cpp /tmp/sdcpp && \
    cd /tmp/sdcpp && mkdir build && cd build && \
    cmake .. -DCMAKE_BUILD_TYPE=Release \
             -DSD_BUILD_SHARED_LIBS=OFF \
             -DGGML_OPENBLAS=ON && \
    cmake --build . --config Release -j2 && \
    cp bin/sd-cli /usr/local/bin/sd-cli && \
    rm -rf /tmp/sdcpp

RUN pip install --no-cache-dir gradio Pillow huggingface-hub

WORKDIR /app
COPY app.py .
COPY README.md .

EXPOSE 7860
CMD ["python", "app.py"]