Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker COPY with checkout fetch-depth: 0 #12066

Merged
merged 1 commit into from
Aug 31, 2023
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Aug 31, 2023

πŸ€– Generated by Copilot at 8a54701

Summary

πŸ“¦πŸššπŸ”§

This pull request modifies the Docker-related files and workflows to copy the current state of the repository to the Docker images, instead of cloning the latest version from GitHub. This allows the Docker images to access the full git history and to match the exact codebase of the repository.

fetch-depth is zero
copying the whole repo
winter of Docker

Walkthrough

  • Copy the current repository contents to the Docker images instead of cloning from GitHub ([link](https://github.com/ultralytics/yolov5/pull/12066/files?diff=unified&w=0#diff-140b4a4c490ff4b325ebe28803157cc59f3b3894af1a98d79ca990bda7877448L27-R27), [link](https://github.com/ultralytics/yolov5/pull/12066/files?diff=unified&w=0#diff-d98329d5cefd0fb8ae8f592080ecfdbe8e4893a909df08623bf372f53508107eL30-R30), [link](https://github.com/ultralytics/yolov5/pull/12066/files?diff=unified&w=0#diff-153cb5313e95fd4c232ca740bff18b6f1b2a9864cb3558125996aded94177f54L33-R33)). This ensures consistency and accuracy of the Docker images with the repository state at the time of the workflow run. The files affected are utils/docker/Dockerfile, utils/docker/Dockerfile-arm64, and utils/docker/Dockerfile-cpu.

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Optimization of Docker builds for the YOLOv5 project by including the full git history.

πŸ“Š Key Changes

  • Updated GitHub Actions workflow to fully fetch the git history (fetch-depth: 0).
  • Modified Dockerfiles to copy the local repository content directly instead of cloning from GitHub.

🎯 Purpose & Impact

  • Ensure consistency: By copying the entire repository (including its git history) into the Docker image, this creates a more consistent and traceable build environment.
  • Reduce errors: Direct copying mitigates issues related to the absence of a .git directory that could occur when cloning.
  • Speed up builds: This change could potentially speed up the Docker build process by using the local copy of the codebase rather than fetching it anew.
  • Impact on users: Users may notice more reliable and faster builds when using Docker images containing the YOLOv5 environment.

@glenn-jocher glenn-jocher merged commit 378ed74 into master Aug 31, 2023
10 checks passed
@glenn-jocher glenn-jocher deleted the docker-updates branch August 31, 2023 13:45
NagatoYuki0943 added a commit to NagatoYuki0943/yolov5-ultralytics that referenced this pull request Sep 1, 2023
Docker COPY with checkout `fetch-depth: 0` (ultralytics#12066)
pleb631 pushed a commit to pleb631/yolov5 that referenced this pull request Jan 6, 2024
Docker COPY with checkout fetch-depth: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant