Diego Marroquin commited on
Commit ·
2bf3812
1
Parent(s): 46c8923
debug, Dockerfile edits
Browse files- Dockerfile +5 -4
- main.py +1 -1
- requirements.txt +1 -0
Dockerfile
CHANGED
|
@@ -1,11 +1,12 @@
|
|
| 1 |
-
FROM python:3.9
|
| 2 |
|
| 3 |
-
|
|
|
|
| 4 |
|
|
|
|
| 5 |
COPY ./requirements.txt /code/requirements.txt
|
| 6 |
-
|
| 7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 8 |
|
| 9 |
COPY . .
|
| 10 |
|
| 11 |
-
CMD ["main:app", "--bind", "0.0.0.0:7860"]
|
|
|
|
| 1 |
+
FROM python:3.9-slim
|
| 2 |
|
| 3 |
+
# Create and set working directory
|
| 4 |
+
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Install python dependencies
|
| 7 |
COPY ./requirements.txt /code/requirements.txt
|
|
|
|
| 8 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 9 |
|
| 10 |
COPY . .
|
| 11 |
|
| 12 |
+
CMD ["gunicorn", "main:app", "--bind", "0.0.0.0:7860"]
|
main.py
CHANGED
|
@@ -600,4 +600,4 @@ class Nucmonitor(Resource):
|
|
| 600 |
|
| 601 |
|
| 602 |
if __name__ == '__main__':
|
| 603 |
-
app.run(host='0.0.0.0', port=7860)
|
|
|
|
| 600 |
|
| 601 |
|
| 602 |
if __name__ == '__main__':
|
| 603 |
+
app.run(host='0.0.0.0', debug=True, port=7860)
|
requirements.txt
CHANGED
|
@@ -7,3 +7,4 @@ numpy==1.22.4
|
|
| 7 |
pandas==1.5.3
|
| 8 |
pymongo==4.3.3
|
| 9 |
Requests==2.31.0
|
|
|
|
|
|
| 7 |
pandas==1.5.3
|
| 8 |
pymongo==4.3.3
|
| 9 |
Requests==2.31.0
|
| 10 |
+
gunicorn==21.2.0
|