Chattr / Dockerfile
MH0386's picture
Upload folder using huggingface_hub
3484c2b verified
raw
history blame
882 Bytes
FROM cgr.dev/chainguard/wolfi-base:latest@sha256:deba562a90aa3278104455cf1c34ffa6c6edc6bea20d6b6d731a350e99ddd32a AS builder
COPY --from=ghcr.io/astral-sh/uv:latest@sha256:f228383e3aca00ab1a54feaaceb8ea1ba646b96d3ee92dc20f5e8e3dcb159c9f \
/uv /uvx /usr/bin/
USER nonroot
RUN --mount=type=cache,target=/root/.cache/uv \
uv tool install chattr
FROM cgr.dev/chainguard/wolfi-base:latest@sha256:deba562a90aa3278104455cf1c34ffa6c6edc6bea20d6b6d731a350e99ddd32a AS production
ENV GRADIO_SERVER_PORT=7860 \
GRADIO_SERVER_NAME=0.0.0.0 \
FASTEMBED_CACHE_PATH=/home/nonroot/fastembed \
PATH=/home/nonroot/.local/bin:$PATH
# skipcq: DOK-DL3018
RUN apk add --no-cache curl libstdc++
USER nonroot
WORKDIR /home/nonroot
COPY --from=builder --chown=nonroot:nonroot --chmod=555 /home/nonroot/.local/ /home/nonroot/.local/
EXPOSE ${GRADIO_SERVER_PORT}
CMD ["chattr"]