Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +3 -2
Dockerfile
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
-
FROM
|
2 |
|
3 |
# Enable bytecode compilation, Copy from the cache instead of linking since it's a mounted volume
|
4 |
ENV UV_COMPILE_BYTECODE=1 \
|
5 |
UV_NO_CACHE=1 \
|
|
|
6 |
GRADIO_SERVER_PORT=8080
|
7 |
|
8 |
RUN groupadd vocalizr && \
|
@@ -13,13 +14,13 @@ RUN groupadd vocalizr && \
|
|
13 |
# apt-get install -qq -y --no-install-recommends espeak-ng && \
|
14 |
# apt-get clean && \
|
15 |
# rm -rf /var/lib/apt/lists/*
|
|
|
16 |
|
17 |
WORKDIR /home/vocalizr/app
|
18 |
|
19 |
RUN --mount=type=bind,source=uv.lock,target=uv.lock \
|
20 |
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
21 |
--mount=type=bind,source=.python-version,target=.python-version \
|
22 |
-
uv python install $(cat .python-version); \
|
23 |
uv export --no-hashes --no-editable --no-dev --quiet -o requirements.txt; \
|
24 |
uv pip install --system -r requirements.txt
|
25 |
|
|
|
1 |
+
FROM python:3.12-slim-bookworm
|
2 |
|
3 |
# Enable bytecode compilation, Copy from the cache instead of linking since it's a mounted volume
|
4 |
ENV UV_COMPILE_BYTECODE=1 \
|
5 |
UV_NO_CACHE=1 \
|
6 |
+
UV_SYSTEM_PYTHON=1 \
|
7 |
GRADIO_SERVER_PORT=8080
|
8 |
|
9 |
RUN groupadd vocalizr && \
|
|
|
14 |
# apt-get install -qq -y --no-install-recommends espeak-ng && \
|
15 |
# apt-get clean && \
|
16 |
# rm -rf /var/lib/apt/lists/*
|
17 |
+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
18 |
|
19 |
WORKDIR /home/vocalizr/app
|
20 |
|
21 |
RUN --mount=type=bind,source=uv.lock,target=uv.lock \
|
22 |
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
23 |
--mount=type=bind,source=.python-version,target=.python-version \
|
|
|
24 |
uv export --no-hashes --no-editable --no-dev --quiet -o requirements.txt; \
|
25 |
uv pip install --system -r requirements.txt
|
26 |
|