SIGN IN SIGN UP
langflow-ai / langflow UNCLAIMED

Langflow is a powerful tool for building and deploying AI-powered agents and workflows.

0 0 1 Python

feat: use uv sources for CPU-only PyTorch (#11833)

* feat: use uv sources for CPU-only PyTorch

Configure [tool.uv.sources] with pytorch-cpu index to avoid ~6GB CUDA
dependencies in Docker images. This replaces hardcoded wheel URLs with
a cleaner index-based approach.

- Add pytorch-cpu index with explicit = true
- Add torch/torchvision to [tool.uv.sources]
- Add explicit torch/torchvision deps to trigger source override
- Regenerate lockfile without nvidia/cuda/triton packages

* fix: address CodeRabbit review issues for PR #11833

- Add Windows AMD64 platform support to required-environments
- Add inline comments explaining architecture naming differences across OSes
- Document why loose version ranges are used (avoid conflicts with transitive deps like altk)
- Exclude Windows ARM64 due to missing wheels for dependencies like faiss-cpu
- Update comments to reflect multi-platform support (Linux, macOS, Windows)

Resolves CodeRabbit issues:
1. Windows platform missing from required-environments
2. Clarifies rationale for loose torch/torchvision version ranges

The loose version ranges (>=2.0.0) are intentional to avoid conflicts with
transitive dependencies (e.g., agent-lifecycle-toolkit requires torch==2.2.2).
The uv sources configuration ensures CPU-only PyTorch wheels are used for all
platforms (verified in lockfile: torch 2.10.0+cpu for Linux/Windows).

* fixed

* fix: reduce Node.js heap size to 4GB in Docker builds to prevent OOM

The Vite frontend build was configured with --max-old-space-size=12288
(12GB), which exceeds available RAM on ARM64 CI runners, causing the
build process to be OOM-killed during the transform phase.

Reduced to 4GB (4096MB) which is sufficient for the Vite build and
prevents OOM kills in memory-constrained Docker BuildKit environments.

* fix: avoid redundant recursive chown on /app in backend Dockerfile

The recursive chown -R on /app was re-owning the entire .venv (~2.6GB,
40k+ files) which was already correctly owned via COPY --chown=1000:0.
This was causing the build to be killed on ARM64 runners.

Changed to non-recursive chown on /app since only the directory itself
needs ownership set. /app/data still gets recursive chown (it's empty).

* fix: add Docker cleanup between image builds to prevent disk full

The 40GB ARM64 runner runs out of disk when building 3 Docker images
sequentially. Each image (main ~8GB layers, backend ~5GB, frontend)
accumulates build cache and layers that exhaust the disk.

Added cleanup steps between builds that:
- Remove the tested image (no longer needed)
- Prune all unused Docker data and buildx cache
- Log disk usage before/after for debugging

---------

Co-authored-by: vijay kumar katuri <vijay.katuri@ibm.com>
R
Ram Gopal Srikar Katakam committed
355a4aa7fc2e50dbb3126e199e35220ba394a960
Parent: 0f5ace2
Committed by GitHub <noreply@github.com> on 2/24/2026, 5:59:01 PM