File tree 3 files changed +35
-0
lines changed
3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ jupyter_notebooks *
2
+ * /env *
3
+ * /venv *
4
+ .circleci *
5
+ packages /regression_model
6
+ * .env
7
+ * .log
8
+ .git
9
+ .gitignore
Original file line number Diff line number Diff line change
1
+ FROM python:3.6.4
2
+
3
+ # Create the user that will run the app
4
+ RUN adduser --disabled-password --gecos '' ml-api-user
5
+
6
+ WORKDIR /opt/ml_api
7
+
8
+ ARG PIP_EXTRA_INDEX_URL
9
+ ENV FLASK_APP run.py
10
+
11
+ # Install requirements, including from Gemfury
12
+ ADD ./packages/ml_api /opt/ml_api/
13
+ RUN pip install --upgrade pip
14
+ RUN pip install -r /opt/ml_api/requirements.txt
15
+
16
+ RUN chmod +x /opt/ml_api/run.sh
17
+ RUN chown -R ml-api-user:ml-api-user ./
18
+
19
+ USER ml-api-user
20
+
21
+ EXPOSE 5000
22
+
23
+ CMD ["bash" , "./run.sh" ]
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ export IS_DEBUG=${DEBUG:- false}
3
+ exec gunicorn -b :${PORT:- 5000} --access-logfile - --error-logfile - run:application
You can’t perform that action at this time.
0 commit comments