Vocalizr / Dockerfile
MH0386's picture
Update Dockerfile
2c9945c verified
raw
history blame
1.02 kB
FROM cgr.dev/chainguard/wolfi-base:latest@sha256:c4136cf075c3eccea5cb7467148ad3934753d7b47e29f78963c2f056aba19643 AS builder
COPY --from=ghcr.io/astral-sh/uv:latest@sha256:5778d479c0fd7995fedd44614570f38a9d849256851f2786c451c220d7bd8ccd \
/uv /uvx /usr/bin/
RUN apk add --no-cache build-base git
USER nonroot
RUN --mount=type=cache,target=/root/.cache/uv \
uv tool install git+https://github.com/AlphaSphereDotAI/vocalizr
FROM cgr.dev/chainguard/wolfi-base:latest@sha256:c4136cf075c3eccea5cb7467148ad3934753d7b47e29f78963c2f056aba19643 AS production
ENV GRADIO_SERVER_PORT=7860 \
GRADIO_SERVER_NAME=0.0.0.0 \
HF_HOME=/home/nonroot/hf \
PATH=/home/nonroot/.local/bin:$PATH
RUN apk add --no-cache curl libstdc++
USER nonroot
WORKDIR /home/nonroot
COPY --from=builder --chown=nonroot:nonroot --chmod=755 /home/nonroot/.local/ /home/nonroot/.local/
COPY --from=builder --chown=nonroot:nonroot --chmod=555 /usr/bin/uv /usr/bin/uvx /usr/bin/
EXPOSE ${GRADIO_SERVER_PORT}
CMD ["uvx", "vocalizr"]