try fix docker build

This commit is contained in:
Vadim committed 2026-02-14 22:11:09 +01:00
1 parent e00a76f900
commit d03c49b8c8
1 file changed
+6 -7
+6 -7
View File
@@ -11,12 +11,11 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"
ENV UV_LINK_MODE=copy
# copy pyproject.toml and uv.lock first to leverage container image build cache
# copy pyproject.toml first to leverage container image build cache
COPY ./pyproject.toml /app/UltraSinger/pyproject.toml
COPY ./uv.lock /app/UltraSinger/uv.lock
WORKDIR /app/UltraSinger
# Sync dependencies from pyproject.toml
# Sync dependencies from pyproject.toml (will create uv.lock if not present)
RUN uv sync
# Install PyTorch with CUDA support (override the CPU version from pyproject.toml)
@@ -25,13 +24,13 @@ RUN uv pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-ur
# copy sources late to allow for caching of layers which contain all the dependencies
COPY . /app/UltraSinger
# no need to run as root
RUN chown -R 1000:1000 /app/UltraSinger
USER 1000:1000
# Set venv path
ENV VIRTUAL_ENV=/app/UltraSinger/.venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# no need to run as root
RUN chown -R 1000:1000 /app/UltraSinger
USER 1000:1000
WORKDIR /app/UltraSinger/src
CMD ["bash"]