Anima-2B-CPU / Dockerfile
Nekochu's picture
fix: clone with submodules
56d5f4e
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"]