-
-
Notifications
You must be signed in to change notification settings - Fork 16.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding the configuration to deploy yolov5 in in app engine (#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 <guilhem@6dbytes.com>
- Loading branch information
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM gcr.io/google-appengine/python | ||
|
||
# Create a virtualenv for dependencies. This isolates these packages from | ||
# system-level packages. | ||
# Use -p python3 or -p python3.7 to select python version. Default is version 2. | ||
RUN virtualenv /env -p python3 | ||
|
||
# Setting these environment variables are the same as running | ||
# source /env/bin/activate. | ||
ENV VIRTUAL_ENV /env | ||
ENV PATH /env/bin:$PATH | ||
|
||
RUN apt-get update && apt-get install -y python-opencv | ||
|
||
# Copy the application's requirements.txt and run pip to install all | ||
# dependencies into the virtualenv. | ||
ADD requirements.txt /app/requirements.txt | ||
RUN pip install -r /app/requirements.txt | ||
|
||
# Add the application source code. | ||
ADD . /app | ||
|
||
# Run a WSGI server to serve the application. gunicorn must be declared as | ||
# a dependency in requirements.txt. | ||
CMD gunicorn -b :$PORT main:app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# add these requirements in your app on top of the existing ones | ||
pip==18.1 | ||
Flask==1.0.2 | ||
gunicorn==19.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
runtime: custom | ||
env: flex | ||
|
||
service: yolov5app | ||
|
||
liveness_check: | ||
initial_delay_sec: 600 | ||
|
||
manual_scaling: | ||
instances: 1 | ||
resources: | ||
cpu: 1 | ||
memory_gb: 4 | ||
disk_size_gb: 20 |