Files
bdi_podman_serverconf/containers/sdcpp/sdcpp-vulkan.Containerfile
T

42 righe
1.4 KiB
Docker

### stable-diffusion.cpp Container with Vulkan GPU support
### Diffusion model (image/video/audio) inference: https://github.com/leejet/stable-diffusion.cpp
###
### BUILD: ./build-sdcpp-vulkan.sh (compiles locally with Vulkan)
### THEN: podman build -t sdcpp:vulkan-amd64 -f sdcpp-vulkan.Containerfile .
FROM debian:13-slim
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libvulkan1 vulkan-tools mesa-vulkan-drivers libdrm-amdgpu1 \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /tmp/* /var/tmp/* \
&& rm -rf /var/lib/apt/lists/* \
&& find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \
&& find /var/cache -type f -delete
WORKDIR /app
# Copy pre-compiled binary with Vulkan support
COPY bin-vulkan/ /app/
RUN chmod +x /app/sd-cli
# Copy entrypoint and GPU-crash watchdog helper
COPY entrypoint.sh /app/entrypoint.sh
COPY watch-gpu.sh /app/watch-gpu.sh
RUN chmod +x /app/entrypoint.sh /app/watch-gpu.sh
# Models and output are mounted as volumes at runtime
RUN mkdir -p /app/models /app/output
ENV PATH=/app:$PATH
ENV LD_LIBRARY_PATH=/app:/usr/local/lib:/usr/lib:/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
# Vulkan environment (adjust if your ICD lives elsewhere)
ENV VK_DRIVER_FILES=/usr/share/vulkan/icd.d/radeon_icd.json
WORKDIR /app
ENTRYPOINT ["/app/entrypoint.sh"]
CMD []