Spaces:
Running
Running
File size: 1,107 Bytes
264f729 b9a47ba 70ec7be 264f729 b9a47ba cbaf8dc b9a47ba 264f729 c67d34c 264f729 5ec2f03 264f729 3e60f77 264f729 5ab5ef6 fb29175 7c67037 5bd1a50 264f729 |
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:debian-slim
# Enable bytecode compilation, Copy from the cache instead of linking since it's a mounted volume
ENV UV_COMPILE_BYTECODE=1 \
UV_LINK_MODE=copy \
UV_NO_CACHE=1 \
UV_PYTHON_PREFERENCE=only-managed \
UV_SYSTEM_PYTHON=1 \
PATH="/home/vocalizr/app/.venv/bin:$PATH" \
GRADIO_SERVER_PORT=8080
RUN groupadd vocalizr && \
useradd --gid vocalizr --shell /bin/bash --create-home vocalizr
# # skipcq: DOK-DL3008
# RUN apt-get update && \
# apt-get install -qq -y --no-install-recommends espeak-ng && \
# apt-get clean && \
# rm -rf /var/lib/apt/lists/*
WORKDIR /home/vocalizr/app
RUN --mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
--mount=type=bind,source=.python-version,target=.python-version \
uv export --no-hashes --no-editable --no-dev -o requirements.txt;
uv pip install --system -r pyproject.toml
COPY --chown=vocalizr:vocalizr . /home/vocalizr/app
USER vocalizr
EXPOSE ${GRADIO_SERVER_PORT}
ENTRYPOINT [ ]
CMD ["python", "src/vocalizr"]
|