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

adding the configuration to deploy yolov5 in in app engine #964

Merged
merged 4 commits into from
Sep 22, 2020
Merged

adding the configuration to deploy yolov5 in in app engine #964

merged 4 commits into from
Sep 22, 2020

Conversation

Guilhen
Copy link
Contributor

@Guilhen Guilhen commented Sep 14, 2020

Here is the configuration to deploy yolov5 in the app engine in google cloud in a docker container.
The Nvidia container provided has some integration issues with the app engine.
The one provided works well

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Introduction of Google App Engine support for YOLOv5.

📊 Key Changes

  • Added Dockerfile for Google App Engine (GAE) environment setup.
  • Created additional_requirements.txt for GAE-specific Python packages.
  • Introduced app.yaml configuration file for GAE deployment settings.

🎯 Purpose & Impact

  • Purpose: Allows YOLOv5 to be deployed on Google Cloud Platform’s App Engine, providing an alternative hosting option that may offer scalability and serverless advantages.
  • Impact: Users now have the flexibility to deploy YOLOv5 models on GAE, potentially reducing infrastructure management overhead and enabling easy application scaling. 🚀

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @Guilhen, thank you for submitting a PR! To allow your work to be integrated as seamlessly as possible, we advise you to:

  • Verify your PR is up-to-date with origin/master. If your PR is behind origin/master update by running the following, replacing 'feature' with the name of your local branch:
git remote add upstream https://github.com/ultralytics/yolov5.git
git fetch upstream
git checkout feature  # <----- replace 'feature' with local branch name
git rebase upstream/master
git push -u origin -f
  • Verify all Continuous Integration (CI) checks are passing.
  • Reduce changes to the absolute minimum required for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." -Bruce Lee

@glenn-jocher
Copy link
Member

This is interesting. Can you explain the use case a bit and how we could integrate with google cloud app engine? Is there a free tier available that can run YOLOv5s?

@Guilhen
Copy link
Contributor Author

Guilhen commented Sep 15, 2020

Hi Glenn,

Here are a few use cases that I can think off:

  1. The hardware used for the deployment doesn't have the capability to support the inference (low computing power or framework not supported: Raspberi pi, some mobiles, any board with a low computing power)
  2. Better software update capability by having the model run on a single web app in the cloud instead of on several devices
  3. The model needs to stay private and cannot be exported on devices

To solve the problem, a python microservice can be deployed in the app engine
The files attached shows the configuration to use to successfully deploy it.
I can also include the web app and how to send a request to it if needed.

Here is a link to try the app engine for free

@glenn-jocher
Copy link
Member

@Guilhen thanks for the explanation and the rebase! I think this would be good to merge.

Would you be able to move the app_engine_config/ directory into the utils/ directory, and perhaps rename it google_app_engine/ in order to make it clearer?

My other concern is the duplication of requirement packages already listed in the main requirements.txt, which will make maintenance more complicated. We already have different requirements for different use cases in practice, such as coremltools and onnx which are only required for export, but this is not well handled at the moment (optional packages are commented in requirements.txt).

I'm thinking we may need to make a transition to a requirements/ directory such as https://github.com/PyTorchLightning/pytorch-lightning/tree/master/requirements with requirements/base.txt, requirements/export.txt, etc., which would then allow this PR to strip the requirements down to only the additional ones required for app engine. What do you think?

@Guilhen
Copy link
Contributor Author

Guilhen commented Sep 22, 2020

Hi Glenn,
That's a good idea, I went ahead and pushed the 2 changes.
You'll now find a folder called google_app_engine in utils that contains the app config, the docker, and the requirements with only the additional libraries required instead of all of them.

@glenn-jocher
Copy link
Member

@Guilhen great! Thanks for the changes, everything looks good.

@glenn-jocher glenn-jocher merged commit 702c4fa into ultralytics:master Sep 22, 2020
burglarhobbit pushed a commit to burglarhobbit/yolov5 that referenced this pull request Jan 1, 2021
…cs#964)

* add the configuration to deploy yolov5 in a docker container in app engine on google cloud

* remove the duplicated requirements, place the google app engine files in utils

* remove the unused requirements

Co-authored-by: guilhembau <[email protected]>
KMint1819 pushed a commit to KMint1819/yolov5 that referenced this pull request May 12, 2021
…cs#964)

* add the configuration to deploy yolov5 in a docker container in app engine on google cloud

* remove the duplicated requirements, place the google app engine files in utils

* remove the unused requirements

Co-authored-by: guilhembau <[email protected]>
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
…cs#964)

* add the configuration to deploy yolov5 in a docker container in app engine on google cloud

* remove the duplicated requirements, place the google app engine files in utils

* remove the unused requirements

Co-authored-by: guilhembau <[email protected]>
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

2 participants