mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-29 20:49:42 +00:00
perf(docker): split dependency install from source copy for CI layer caching (#4208)
* perf(docker): split dep install from src copy for CI layer caching Install third-party deps (torch + all extras) in a layer keyed only on pyproject.toml + uv.lock via --no-install-project, then copy src and install the local package. Editing src/ no longer busts the heavy dependency layer, so BuildKit layer cache hits across CI builds. Applied to both Dockerfile.user and Dockerfile.internal. * chore(ci): less verbose comments + copy all files --------- Co-authored-by: dongmao.zhang <dongmao.zhang@bytedance.com>
This commit is contained in:
@@ -60,15 +60,14 @@ ENV HOME=/home/user_lerobot \
|
||||
# run other Python projects in the same container without dependency conflicts.
|
||||
RUN uv venv
|
||||
|
||||
# Install Python dependencies for caching
|
||||
# Install third-party dependencies separately for layer caching
|
||||
COPY --chown=user_lerobot:user_lerobot setup.py pyproject.toml uv.lock README.md MANIFEST.in ./
|
||||
COPY --chown=user_lerobot:user_lerobot src/ src/
|
||||
RUN uv sync --locked --extra all --no-install-project --no-cache
|
||||
|
||||
RUN uv sync --locked --extra all --no-cache
|
||||
|
||||
# Copy the rest of the application code
|
||||
# Copy the application code and install the local project
|
||||
# Make sure to have the git-LFS files for testing
|
||||
COPY --chown=user_lerobot:user_lerobot . .
|
||||
RUN uv sync --locked --extra all --no-cache
|
||||
|
||||
# Set the default command
|
||||
CMD ["/bin/bash"]
|
||||
|
||||
Reference in New Issue
Block a user