Spaces:
Build error
Build error
| FROM cgr.dev/chainguard/wolfi-base:latest@sha256:17ab0709456ce1a2aedd85e95f72e58d73133bb70c33ae945a4d4b2424e984f1 AS builder | |
| ARG INSTALL_SOURCE | |
| ARG PYTHON_VERSION | |
| # skipcq: DOK-DL3018 | |
| RUN apk add --no-cache build-base git uv | |
| USER nonroot | |
| RUN --mount=type=cache,target=/root/.cache/uv \ | |
| uv tool install ${INSTALL_SOURCE} --python ${PYTHON_VERSION} | |
| FROM cgr.dev/chainguard/wolfi-base:latest@sha256:17ab0709456ce1a2aedd85e95f72e58d73133bb70c33ae945a4d4b2424e984f1 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"] | |