# llama.cpp web UI on a Hugging Face Docker Space (free cpu-basic tier). # Plain Ubuntu base: the llama.app installer downloads the CPU build at runtime. # The GGUF model is fetched at runtime (see start.sh) so the image stays tiny. FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive # curl + zstd are required by the llama.app installer; ca-certificates for HTTPS. RUN apt-get update \ && apt-get install -y --no-install-recommends \ curl \ ca-certificates \ zstd \ && rm -rf /var/lib/apt/lists/* # Hugging Face Spaces run as uid 1000; create a matching non-root user. RUN useradd --create-home --uid 1000 --shell /bin/bash user WORKDIR /home/user/app COPY --chown=user:user start.sh /home/user/app/start.sh RUN chmod +x /home/user/app/start.sh USER user EXPOSE 8080 CMD ["/home/user/app/start.sh"]