Skip to content

Commit 7b384cf

Browse files
committed
Document Docker build
1 parent d7e9001 commit 7b384cf

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,31 @@ Tip of the Hat
2020
===============
2121
A tip of the hat to [Adrian Rosebrock](https://www.pyimagesearch.com/about/) to get me started. His articles are great.
2222

23+
Running in a Docker container
24+
=============================
25+
A simple `Dockerfile` is included with this project. It is preconfigured for *YOLOv4* model but can easily be changed to use any other available models.
26+
27+
To build it run:
28+
29+
```
30+
git clone https://github.com/pliablepixels/mlapi.git
31+
cd mlapi
32+
docker build -t mlapi:local .
33+
```
34+
35+
Once built you can run the container:
36+
37+
```
38+
docker run --rm -it -e MLAPI_USER="myuser" -e MLAPI_PASSWORD="Passw0rd" -p 5000:5000 mlapi:local
39+
```
40+
41+
To quickly test it run `curl http://localhost:5000/api/v1/health`, then follow the instructions below under the *Running* section.
42+
2343
Containerized Fork
24-
==================
25-
themoosman maintains a containerized fork of this [repo](https://github.com/themoosman/mlapi). This fork runs as a container and has been refactored to a WSGI (NGINX + Gunicorn + Flask) application. Please **do not** post questions about his containerized fork here. Please post issues in his fork.
44+
------------------
45+
[@themoosman](https://github.com/themoosman) maintains a [containerized fork of this mlapi](https://github.com/themoosman/mlapi).
46+
47+
This fork has been refactored to a WSGI (NGINX + Gunicorn + Flask) application. Please **do not** post questions about his containerized fork here. Please post issues in his fork.
2648

2749
Install
2850
=======
@@ -37,7 +59,7 @@ Note that this package also needs OpenCV which is not installed by the above ste
3759

3860
Then:
3961
```
40-
git clone https://github.com/pliablepixels/mlapi
62+
git clone https://github.com/pliablepixels/mlapi.git
4163
cd mlapi
4264
sudo -H pip3 install -r requirements.txt
4365
```

0 commit comments

Comments
 (0)