Spaces:
Build error
Build error
owaiskha9654
commited on
Commit
•
becd37a
1
Parent(s):
1ddbf73
add gcp
Browse files
utils/google_app_engine/Dockerfile
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM gcr.io/google-appengine/python
|
2 |
+
|
3 |
+
# Create a virtualenv for dependencies. This isolates these packages from
|
4 |
+
# system-level packages.
|
5 |
+
# Use -p python3 or -p python3.7 to select python version. Default is version 2.
|
6 |
+
RUN virtualenv /env -p python3
|
7 |
+
|
8 |
+
# Setting these environment variables are the same as running
|
9 |
+
# source /env/bin/activate.
|
10 |
+
ENV VIRTUAL_ENV /env
|
11 |
+
ENV PATH /env/bin:$PATH
|
12 |
+
|
13 |
+
RUN apt-get update && apt-get install -y python-opencv
|
14 |
+
|
15 |
+
# Copy the application's requirements.txt and run pip to install all
|
16 |
+
# dependencies into the virtualenv.
|
17 |
+
ADD requirements.txt /app/requirements.txt
|
18 |
+
RUN pip install -r /app/requirements.txt
|
19 |
+
|
20 |
+
# Add the application source code.
|
21 |
+
ADD . /app
|
22 |
+
|
23 |
+
# Run a WSGI server to serve the application. gunicorn must be declared as
|
24 |
+
# a dependency in requirements.txt.
|
25 |
+
CMD gunicorn -b :$PORT main:app
|
utils/google_app_engine/additional_requirements.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# add these requirements in your app on top of the existing ones
|
2 |
+
pip==18.1
|
3 |
+
Flask==1.0.2
|
4 |
+
gunicorn==19.9.0
|
utils/google_app_engine/app.yaml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
runtime: custom
|
2 |
+
env: flex
|
3 |
+
|
4 |
+
service: yolorapp
|
5 |
+
|
6 |
+
liveness_check:
|
7 |
+
initial_delay_sec: 600
|
8 |
+
|
9 |
+
manual_scaling:
|
10 |
+
instances: 1
|
11 |
+
resources:
|
12 |
+
cpu: 1
|
13 |
+
memory_gb: 4
|
14 |
+
disk_size_gb: 20
|