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
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions app_engine_config/Dockerfile
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
14 changes: 14 additions & 0 deletions app_engine_config/app.yaml
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
16 changes: 16 additions & 0 deletions app_engine_config/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
pip==18.1
Flask==1.0.2
pandas==0.23.4
xlrd==1.2.0
gunicorn==19.9.0
Cython==0.29.21
numpy==1.17.0
opencv-python==4.3.0.38
torch==1.5.1
matplotlib==3.2.2
pillow
tensorboard
PyYAML>=5.3
torchvision==0.6.1
scipy==1.5.1
tqdm