llama-swap-rocm now uses official image and adjusted accordingly

This commit is contained in:
2026-02-07 23:43:01 +02:00
parent 11b90ebb46
commit b9d1f67d70

View File

@@ -39,30 +39,30 @@ WORKDIR /app
# Copy llama-swap binary from builder # Copy llama-swap binary from builder
COPY --from=swap-builder /build/llama-swap-binary /app/llama-swap COPY --from=swap-builder /build/llama-swap-binary /app/llama-swap
# Make binary executable # Make binaries executable
RUN chmod +x /app/llama-swap RUN chmod +x /app/llama-swap
# Create non-root user and add to GPU access groups # Add existing ubuntu user (UID 1000) to GPU access groups (using host GIDs)
# The official llama.cpp image already has llama-server installed # GID 187 = render group on host, GID 989 = video/kfd group on host
# GID 187 = render group on host, GID 989 = video/kfd group on host RUN groupadd -g 187 hostrender && \
RUN groupadd -g 187 hostrender && \ groupadd -g 989 hostvideo && \
groupadd -g 989 hostvideo && \ usermod -aG hostrender,hostvideo ubuntu && \
useradd -m -u 1000 -G hostrender,hostvideo llamaswap && \ chown -R ubuntu:ubuntu /app
chown -R llamaswap:llamaswap /app
# Set environment for ROCm (RX 6800 is gfx1030)
# Set environment for ROCm (RX 6800 is gfx1030) ENV HSA_OVERRIDE_GFX_VERSION=10.3.0
ENV HSA_OVERRIDE_GFX_VERSION=10.3.0 ENV ROCM_PATH=/opt/rocm
ENV ROCM_PATH=/opt/rocm ENV HIP_VISIBLE_DEVICES=0
ENV HIP_VISIBLE_DEVICES=0
USER ubuntu
USER llamaswap
# Expose port
# Expose port EXPOSE 8080
EXPOSE 8080
# Health check
# Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \ CMD curl -f http://localhost:8080/health || exit 1
CMD curl -f http://localhost:8080/health || exit 1
# Override the base image's ENTRYPOINT and run llama-swap
# Run llama-swap ENTRYPOINT []
CMD ["/app/llama-swap", "-config", "/app/config.yaml", "-listen", "0.0.0.0:8080"] CMD ["/app/llama-swap", "-config", "/app/config.yaml", "-listen", "0.0.0.0:8080"]