Skip to content

Docker: Add --frozen flag #116

Closed
Closed

Description

@nishika26

Is your feature request related to a problem?
The Docker build fails at the final uv sync step due to a missing --frozen flag. This causes all deployments to EC2 to break as the Docker image cannot be built.

Describe the solution you'd like

  • Add --frozen to the second uv sync call so it respects the lockfile:
    RUN --mount=type=cache,target=/root/.cache/uv \  
        uv sync --frozen  
    
Original issue

Description

The Docker build fails at the final uv sync step with:

Distribution torch==2.11.0 @ registry+https://download.pytorch.org/whl/cpu can't be installed because it doesn't have a source distribution or wheel for the current platform

Root cause

The Dockerfile uses the recommended two-stage uv sync pattern:

uv sync --frozen --no-install-project — installs dependencies into a cached layer
uv sync — installs the project itself after app code is copied
The second uv sync is missing --frozen, which causes uv to re-resolve all dependencies from scratch instead of using the lockfile. During re-resolution on Linux/amd64 (EC2), uv cannot find a compatible torch wheel from the pytorch-cpu index, even though the lockfile already has a valid resolution.

Fix

Add --frozen to the second uv sync call so it respects the lockfile:

RUN --mount=type=cache,target=/root/.cache/uv
uv sync --frozen
Impact

All deployments to EC2 are broken — the Docker image cannot be built.

Activity

  1. changed the title [-]Docker build fails: torch wheel not found on Linux due to missing --frozen flag in second uv sync[/-] [+]Docker: Add --frozen flag[/+] on May 12, 2026
  2. self-assigned this
    on May 12, 2026
  3. added theissue type on May 12, 2026
  4. linked a pull request that will close this issuedeployment: uv sync frozen specify #115on May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions