From e1346dbab44c7f546d34e59b2b9d6227d44d91b9 Mon Sep 17 00:00:00 2001 From: Pranjal Pandey Date: Tue, 7 Nov 2023 20:48:40 +0530 Subject: [PATCH 1/2] run flask in docker --- docker/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 3640ada..b0b29e6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,4 +2,7 @@ FROM python:3.9.17 COPY . /digits/ RUN pip3 install --no-cache-dir -r /digits/requirements.txt WORKDIR /digits -CMD ["python3","digits.py","--runs=1","--test_size=0.2","--dev_size=0.3","--models=svm,tree"] \ No newline at end of file +EXPOSE 5000 +ENV FLASK_APP=api/app.py +CMD ["run","flask"] +#CMD ["python3","digits.py","--runs=1","--test_size=0.2","--dev_size=0.3","--models=svm,tree"] \ No newline at end of file From 05c742bfec3173596c3f54f9922ae8c098e5971d Mon Sep 17 00:00:00 2001 From: Pranjal Pandey Date: Tue, 7 Nov 2023 20:57:24 +0530 Subject: [PATCH 2/2] fix image --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index b0b29e6..815f204 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -4,5 +4,5 @@ RUN pip3 install --no-cache-dir -r /digits/requirements.txt WORKDIR /digits EXPOSE 5000 ENV FLASK_APP=api/app.py -CMD ["run","flask"] +CMD ["run","flask","--host=0.0.0.0"] #CMD ["python3","digits.py","--runs=1","--test_size=0.2","--dev_size=0.3","--models=svm,tree"] \ No newline at end of file