idealo / falcon-prediction-app Goto Github PK
View Code? Open in Web Editor NEWSimple Machine Learning Web API Example with Falcon
License: Apache License 2.0
Simple Machine Learning Web API Example with Falcon
License: Apache License 2.0
โ nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2020-12-12 11:24:10 CET; 5ms ago
Docs: man:nginx(8)
Process: 6580 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Dec 12 11:24:10 GPU10 systemd[1]: Starting A high performance web server and a reverse proxy server...
Dec 12 11:24:10 GPU10 nginx[6580]: nginx: [emerg] "server" directive is not allowed here in /etc/nginx/nginx.conf:1
Dec 12 11:24:10 GPU10 nginx[6580]: nginx: configuration file /etc/nginx/nginx.conf test failed
Dec 12 11:24:10 GPU10 systemd[1]: nginx.service: Control process exited, code=exited status=1
Dec 12 11:24:10 GPU10 systemd[1]: nginx.service: Failed with result 'exit-code'.
Dec 12 11:24:10 GPU10 systemd[1]: Failed to start A high performance web server and a reverse proxy server.
"server" directive is not allowed in the first line
Hi,
We are trying to serve our model using tf serving. Is it ok to use Falcon + Gunicorn + Gevent + tf serving? Currently we might only need to handle 500 requests/s. So maybe Nginx is not necessary? Thanks.
(base) dario@GPU10:~/falcon-prediction-app$ sudo docker build -t falcon-prediction-app .
Sending build context to Docker daemon 55.72MB
Step 1/20 : FROM nginx:stable-alpine
---> a8054a07a2ce
Step 2/20 : LABEL maintainer="[email protected]"
---> Using cache
---> f5ebfbd510b3
Step 3/20 : RUN apk --update --repository http://dl-4.alpinelinux.org/alpine/edge/community add bash git curl ca-certificates bzip2 unzip sudo libstdc++ glib libxext libxrender tini supervisor && curl -L "https://github.com/andyshinn/alpine-pkg-glibc/releases/download/2.25-r0/glibc-2.25-r0.apk" -o /tmp/glibc.apk && curl -L "https://github.com/andyshinn/alpine-pkg-glibc/releases/download/2.25-r0/glibc-bin-2.25-r0.apk" -o /tmp/glibc-bin.apk && curl -L "https://github.com/andyshinn/alpine-pkg-glibc/releases/download/2.25-r0/glibc-i18n-2.25-r0.apk" -o /tmp/glibc-i18n.apk && apk add --allow-untrusted /tmp/glibc*.apk && /usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib && /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 && rm -rf /tmp/glibc*apk /var/cache/apk/*
---> Using cache
---> 07017f100464
Step 4/20 : RUN echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh && curl https://repo.continuum.io/miniconda/Miniconda3-4.3.27-Linux-x86_64.sh -o ~/miniconda.sh && /bin/bash ~/miniconda.sh -f -b -p /opt/conda && rm ~/miniconda.sh
---> Using cache
---> d8138ae2d9a6
Step 5/20 : ENV PATH /opt/conda/bin:$PATH
---> Using cache
---> 58b1b118d389
Step 6/20 : RUN mkdir /run/nginx/ && mv /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.bak
---> Using cache
---> 8b28099f4891
Step 7/20 : ADD conf/nginx.conf /etc/nginx/conf.d/
---> Using cache
---> 9c7a9cdd31fc
Step 8/20 : ADD conf/supervisor.ini /etc/supervisor.d/
---> Using cache
---> d7d85fe47ebf
Step 9/20 : COPY environment.yml /
---> Using cache
---> de179ad7f795
Step 10/20 : RUN conda env create -f=environment.yml -n myapp
---> Running in d4f18c13b5e1
/bin/sh: conda: not found
The command '/bin/sh -c conda env create -f=environment.yml -n myapp' returned a non-zero code: 127
https://github.com/idealo/falcon-prediction-app/blob/master/src/prediction_app/predict.py#L28
I believe this comment is wrong, and should instead be
(echo -n '{"image": "'; base64 src/tests/data/four_test.png; echo '"}') |
curl -i -H "Content-Type: application/json" -d @- http://127.0.0.1:8000/predict
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.