Chattr / Dockerfile
MH0386's picture
Upload folder using huggingface_hub
dfd58b7 verified
raw
history blame contribute delete
882 Bytes
FROM cgr.dev/chainguard/wolfi-base:latest@sha256:1fd981aa0bcefd8da87ce55a9ae907862fcb6835c658fdb284867117fb0268ce AS builder
COPY --from=ghcr.io/astral-sh/uv:latest@sha256:b05b3d61eb2b264ed785265b71155738a0d3d382ea0699e048d4b36f90b88788 \
/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:1fd981aa0bcefd8da87ce55a9ae907862fcb6835c658fdb284867117fb0268ce 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"]