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

FROM nvcr.io/nvidia/pytorch:22.06-py3 #8600

Merged
merged 1 commit into from
Jul 16, 2022
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jul 16, 2022

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Updating the base Docker image and refining Python package installations for YOLOv5.

πŸ“Š Key Changes

  • 🐳 Docker base image updated from NVIDIA PyTorch 22.05-py3 to 22.06-py3.
  • 🧹 Removal of a large unneeded directory (/opt/pytorch) to save space.
  • πŸ”„ Changed the pip uninstall command to keep torch and torchvision, but remove Pillow.
  • πŸ“¦ Added specific version constraints to Pillow and limited opencv-python version.

🎯 Purpose & Impact

  • πŸš€ Ensures compatibility with the latest software stacks by updating to a newer NVIDIA PyTorch image.
  • πŸ› οΈ Streamlines the Docker image by removing unnecessary components, which might lead to a smaller image size and reduced clutter.
  • 🐍 Prevents potential conflicts by uninstalling and then reinstalling Pillow with a specific version, ensuring compatibility with other packages.
  • ✨ Users get a more optimized environment for running YOLOv5, potentially improving both development and inference performance.

@glenn-jocher glenn-jocher self-assigned this Jul 16, 2022
@glenn-jocher glenn-jocher merged commit 2430578 into master Jul 16, 2022
@glenn-jocher glenn-jocher deleted the update/dockerfile branch July 16, 2022 22:55
@AyushExel
Copy link
Contributor

AyushExel commented Jul 17, 2022

@glenn-jocher hey, whats the scope of this PR? I have a training task running on a docker image from 2 days ago.. I created another image and ran the same task but it's throwing a pytorch error. It works on my non gpu machine so I guess this change affected that? Here's the error:

  File "/usr/src/yolov5/utils/seg_loss.py", line 305, in build_targets_for_masks

    indices.append((b, a, gj.clamp_(0, gain[3] - 1), gi.clamp_(0, gain[2] - 1)))  # image, anchor, grid indices


RuntimeError: result type Float can't be cast to the desired output type long int

Reverting pytorch to v 1.11.0 fixes it

@glenn-jocher
Copy link
Member Author

glenn-jocher commented Jul 17, 2022

@AyushExel it looks like your code is out of date a bit. You need to apply the changes in this PR from a few weeks ago to your branch and this will fix the above error.
https://github.com/ultralytics/yolov5/pull/8067/files

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.

2 participants