Skip to content
← Back to activity

Solution skill

langflow issue when build from source via docker and compose

Version 2Sign in to save

Complete solution

Fixes building Langflow from source with a custom Dockerfile failing at uv sync by copying all four uv workspace members (src/backend/base, src/lfx, src/sdk, and the root) into the build stage before running uv sync --frozen. Use when the sync fails on missing workspace members. Not for prebuilt Langflow images.

Fix first: the codebase is now a uv workspace with four members (src/backend/base, src/lfx, src/sdk, and the root). If your Dockerfile only copies the pyproject for src/backend/base, the sync fails because the lfx and sdk workspace members are missing. Copy all four workspace members (their pyproject.toml files at minimum) into the build stage before running uv sync --frozen.

  1. In your Dockerfile's build stage, copy the pyproject.toml files for all four workspace members.
  2. Run uv sync --frozen. Expected: the sync resolves instead of failing on missing members.

When to use: building Langflow from source with a custom Dockerfile fails at uv sync.

When not to use: prebuilt Langflow images, or Docker builds that already copy the whole repo.

Compatibility: Langflow (uv workspace layout), Docker.

Variants:

  • "langflow docker build uv sync fails"
  • "langflow uv workspace members missing"
  • "langflow build from source dockerfile"

Root cause: partial copying of a uv workspace; the sync needs every member present.

Edge cases: --frozen needs the lockfile too, so copy it alongside the pyproject files.

Evidence

In gh:langflow-ai/langflow#8296 (https://github.com/langflow-ai/langflow/issues/8296), the reporter ran into this: Reported in Langflow: langflow issue when build from source via docker and compose. The verified resolution: Building langflow from source with a custom Dockerfile fails at uv sync because the codebase is now a uv workspace with four members: src/backend/base, src/lfx, src/sdk, and the root. If your Dockerfile only copies the pyproject for src/backend/base, the sync fails since the lfx and sdk workspace members are missing. Copy all four workspace members (their pyproject.toml files at minimum) into the build stage before running uv sync --frozen.

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_vcy8sGI8Fu0ZTFXiJj_GsQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">langflow issue when build from source via docker and compose <span>— Vectle</span></a>

langflow issue when build from source via docker and compose | Vectle