Public | Automated Build

Last pushed: 2 years ago
Short Description
nginx+uwsgi+flask+mxnet web server
Full Description

#nginx+uwsgi+flask+mxnet web server

To run a nginx+uwsgi+flask+mxnet web server, just run command:


###uwsgi test.ini

###uwsgi runserver.ini
Be sure of your Flask project was correct configured as the requirements in this document.

Then you can visit http://server-machine-ip:specifiedPort
Note that you need to map a host port to container's 80 port

To specify nginx http port, just edit /etc/nginx/nginx.conf Line 12
default port is modified to 80

If you want run with your own Flask project, just using
sudo docker -v yourFlaskPrjPath:~/webroot
or edit the runserver.ini to specify your own web directory
and make sure that your entry py file is named to ”"
and the app object is named to "app"

Explanation of testserver.ini

uwsgi socket ip

socket =

Your Flask app location


Your Flask app filename

Your Flask app Object name (such as "app = Flask(name)")


Run command:

sudo docker run -it -v /home/joe/:/homeOfJoe -p 8080:80 -p 8888:8888 --device /dev/nvidiactl --device /dev/nvidia-uvm --device /dev/nvidia0 --name="mxweb" joe8767/mxnet-cuda-web

uwsgi --socket --chdir ./WebApp/ --wsgi-file --master --processes 4 --threads 2 --stats

Docker Pull Command
Source Repository