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

RUN git clone instead of COPY to /usr/src/app #8827

Merged
merged 1 commit into from
Aug 1, 2022
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Aug 1, 2022

Avoid the need for a separate /yolov5 git clone directory.

Problem with COPY . /usr/src/app is that directory is not a .git directory, so normal ops like git pull etc don't work in Docker currently. This should resolve this issue.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Improvement of Dockerfile configurations for YOLOv5 repository cloning.

📊 Key Changes

  • Removed the COPY . /usr/src/app command in Dockerfiles across multiple architectures (default, ARM64, CPU).
  • Replaced with RUN git clone https://github.com/ultralytics/yolov5 /usr/src/app to directly clone the YOLOv5 repo into the working directory.

🎯 Purpose & Impact

  • 🛠 Fixes issues related to the Docker container not recognizing a .git directory due to the previous COPY command.
  • ✅ Ensures a smoother setup and deployment process for users employing Docker, leading to a more reliable development and testing environment.
  • 🚀 Potential to increase user satisfaction with the YOLOv5 Docker implementation as it alleviates past configuration issues.

@glenn-jocher glenn-jocher self-assigned this Aug 1, 2022
@glenn-jocher glenn-jocher merged commit ba140e5 into master Aug 1, 2022
@glenn-jocher glenn-jocher deleted the docker/clone_app branch August 1, 2022 19:45
@glenn-jocher
Copy link
Member Author

glenn-jocher commented Aug 1, 2022

@AyushExel this should let us work directly from the default Docker WORKDIR, i.e. usr/src/app. It will now be a full git clone directory, with /yolov5 removed.

i.e. directly on entering a docker container you should be able to git pull, git checkout classifier etc. which isn't possible now and the reason I had a separate /yolov5 dir next to the /app dir.

ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
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.

1 participant