diff --git a/docker/Dockerfile.internal b/docker/Dockerfile.internal index 19f0167b3..c1c54dba9 100644 --- a/docker/Dockerfile.internal +++ b/docker/Dockerfile.internal @@ -68,17 +68,16 @@ ENV HOME=/home/user_lerobot \ # issues with MuJoCo and OpenGL drivers. RUN uv venv --python python${PYTHON_VERSION} -# 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-cache +RUN uv sync --locked --extra all --no-install-project --no-cache RUN chmod +x /lerobot/.venv/lib/python${PYTHON_VERSION}/site-packages/triton/backends/nvidia/bin/ptxas -# Copy the rest of the application source code +# Copy the application source 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"] diff --git a/docker/Dockerfile.user b/docker/Dockerfile.user index 2aae8b321..8d6bf5005 100644 --- a/docker/Dockerfile.user +++ b/docker/Dockerfile.user @@ -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"]