Files
bdi_podman_serverconf/Services/lemonade/lemonade-ubuntu.Containerfile
2025-11-23 18:54:35 +01:00

33 rindas
1.3 KiB
Docker

# Lemonade Server ROCm Containerfile with lightweight runtime base
# Build: podman build -t lemonade:ubuntu-amd64 -f lemonade-ubuntu.Containerfile .
# Export: podman save -o /home/duckpage/lemonade-ubuntu-amd64.tar localhost/lemonade:ubuntu-amd64
# =========================
# Stage: Runtime (Lightweight ROCm runtime)
# =========================
FROM ubuntu:24.04
USER root
EXPOSE 8000
# Install Lemonade SDK
RUN apt-get update && apt-get install -y nano unzip wget curl jq pciutils ffmpeg libatomic1 && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
update-pciids && \
VERSION=$(curl -s https://api.github.com/repos/lemonade-sdk/lemonade/releases/latest | jq -r .tag_name | sed 's/^v//') && \
wget -O /tmp/lemonade-server-minimal.deb \
https://github.com/lemonade-sdk/lemonade/releases/download/v${VERSION}/lemonade-server-minimal_${VERSION}_amd64.deb && \
dpkg -i /tmp/lemonade-server-minimal.deb || apt-get install -fy && \
rm /tmp/lemonade-server-minimal.deb
# Fix Proxy
COPY lemonade.fix-proxy.sh /usr/local/bin/fix-proxy.sh
RUN chmod +x /usr/local/bin/fix-proxy.sh
RUN /usr/local/bin/fix-proxy.sh
# Se nel tuo base usi un utente non-root (es. appuser), scommenta:
# USER appuser
ENTRYPOINT ["lemonade-server"]
CMD ["serve", "--port", "8000", "--host", "0.0.0.0", "--ctx-size", "131072", "--llamacpp", "vulkan"]