mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-11 14:49:43 +00:00
fix(docker): use uv pip install instead of uv sync (cross-extra conflict)
uv sync --locked validates the entire lockfile across all extras. Since robomme depends on mani-skill which pins numpy<2.0, and the base project requires numpy>=2.0, the full lockfile is unsatisfiable. Switch to uv pip install -e ".[libero,smolvla]" which only resolves the requested extras for the current Python version and platform, avoiding the cross-extra numpy conflict entirely. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -64,10 +64,14 @@ RUN uv venv --python python${PYTHON_VERSION}
|
||||
# ── Dependency layer (cached unless pyproject.toml / uv.lock change) ────────
|
||||
# Copy only the files uv needs to resolve deps, plus a minimal package stub
|
||||
# so the editable install can succeed without the full source tree.
|
||||
# Uses `uv pip install` instead of `uv sync` because uv sync validates the
|
||||
# entire lockfile across all extras — robomme's numpy<2.0 conflicts with the
|
||||
# base numpy>=2.0, making the full lockfile unsatisfiable. pip-style install
|
||||
# only resolves the requested extras for the current platform.
|
||||
COPY --chown=user_lerobot:user_lerobot setup.py pyproject.toml uv.lock README.md MANIFEST.in ./
|
||||
RUN mkdir -p src/lerobot && touch src/lerobot/__init__.py src/lerobot/py.typed
|
||||
|
||||
RUN uv sync --locked --extra libero --extra smolvla --no-cache
|
||||
RUN uv pip install --no-cache -e ".[libero,smolvla]"
|
||||
|
||||
# Pre-download lerobot/libero-assets from HF Hub so nothing is fetched at
|
||||
# runtime (which times out on CI). Point the libero config at the cached path.
|
||||
|
||||
@@ -64,10 +64,12 @@ RUN uv venv --python python${PYTHON_VERSION}
|
||||
# ── Dependency layer (cached unless pyproject.toml / uv.lock change) ────────
|
||||
# Copy only the files uv needs to resolve deps, plus a minimal package stub
|
||||
# so the editable install can succeed without the full source tree.
|
||||
# Uses `uv pip install` instead of `uv sync` — see Dockerfile.benchmark.libero
|
||||
# for rationale (cross-extra numpy conflict with robomme).
|
||||
COPY --chown=user_lerobot:user_lerobot setup.py pyproject.toml uv.lock README.md MANIFEST.in ./
|
||||
RUN mkdir -p src/lerobot && touch src/lerobot/__init__.py src/lerobot/py.typed
|
||||
|
||||
RUN uv sync --locked --extra metaworld --extra smolvla --no-cache
|
||||
RUN uv pip install --no-cache -e ".[metaworld,smolvla]"
|
||||
|
||||
# Workaround: Triton ships ptxas without the execute bit set.
|
||||
# Without this chmod, any JIT compilation (e.g. torch.compile) fails
|
||||
|
||||
Reference in New Issue
Block a user