Spaces:
Sleeping
Sleeping
File size: 1,156 Bytes
c5f6c3c b9a47ba f790365 8241f76 f790365 8241f76 38e8073 8241f76 4694917 8241f76 c5f6c3c f790365 5c2b015 305a852 b9a47ba 242ebd9 bcc762e be6b8f8 9ef28d1 28470fb 8241f76 26a56bb 305a852 eb446cb 8241f76 f790365 305a852 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
ENV UV_COMPILE_BYTECODE=1 \
UV_NO_CACHE=1 \
UV_SYSTEM_PYTHON=1 \
UV_FROZEN=1 \
PATH="/root/.local/bin:$PATH" \
GRADIO_SERVER_PORT=7860 \
GRADIO_SERVER_NAME=0.0.0.0
RUN groupadd vocalizr && \
useradd -g vocalizr -s /bin/bash -d /app vocalizr && \
apt-get update -qq && \
apt-get install -qq -y --no-install-recommends espeak-ng ffmpeg && \
apt-get clean -qq && \
rm -rf /var/lib/apt/lists/* && \
uv tool install --quiet huggingface-hub[cli] && \
huggingface-cli download --quiet hexgrad/Kokoro-82M && \
uv tool uninstall --quiet huggingface-hub
WORKDIR /app
RUN --mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
--mount=type=bind,source=README.md,target=README.md \
--mount=type=bind,source=src,target=/app/src \
uv export --no-hashes --no-editable --no-dev --quiet -o pylock.toml && \
uv pip sync pylock.toml
RUN chown -R vocalizr:vocalizr /app
COPY --chown=vocalizr:vocalizr . /app
USER vocalizr
EXPOSE ${GRADIO_SERVER_PORT}
CMD ["python", "src/vocalizr"] |