文件
bdi_podman_serverconf/Services/lemonade/lemonade-ubuntu.Containerfile

44 行
1.5 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
COPY *.deb /tmp/
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//') && \
DEB_FILE=$(ls /tmp/*.deb 2>/dev/null | head -1) && \
if [ -n "$DEB_FILE" ]; then \
cp "$DEB_FILE" /tmp/lemonade-server-minimal.deb; \
else \
wget -O /tmp/lemonade-server-minimal.deb \
https://github.com/lemonade-sdk/lemonade/releases/download/v${VERSION}/lemonade-server-minimal_${VERSION}_amd64.deb; \
fi && \
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
ENV LEMONADE_LLAMACPP=vulkan
ENV LEMONADE_HOST=0.0.0.0
ENV LEMONADE_PORT=8000
ENV LEMONADE_CTX_SIZE=131072
# Se nel tuo base usi un utente non-root (es. appuser), scommenta:
# USER appuser
ENTRYPOINT ["lemonade-server"]
CMD ["serve"]