File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 1+ FROM ubuntu:16.04
2+
3+ # Install Python.
4+ RUN \
5+ apt-get update && \
6+ apt-get install -y python python-dev python-pip python-virtualenv && \
7+ rm -rf /var/lib/apt/lists/*
8+
9+ WORKDIR app
10+
11+ # reqs from file, to speed up dev iteration
12+ RUN pip install Werkzeug Flask numpy Keras gevent pillow h5py tensorflow
13+
14+ COPY . .
15+
16+ RUN pip install -r requirements.txt
17+
18+ ENTRYPOINT [ "python" , "app.py" ]
Original file line number Diff line number Diff line change 2323
2424------------------
2525
26- ## Installation
26+ ## Docker Installation
27+
28+ Build the image
29+
30+ ``` shell
31+ cd keras-flask-deploy-webapp
32+ docker build -t keras_flask .
33+ docker run -e MODEL_PATH=models/your_model.h5 -p 5000:5000
34+ ```
35+
36+ You can mount your model into the container.
37+
38+ ``` shell
39+ docker run -e MODEL_PATH=/mnt/models/your_model.h5 -v volume-name:/mnt/models -p 5000:5000 keras_flask
40+ ```
41+
42+
43+ ## Local Installation
2744
2845### Clone the repo
2946``` shell
You can’t perform that action at this time.
0 commit comments