Skip to content

Commit f7b361a

Browse files
committed
Revert back to prev dockerfile
1 parent 0675b83 commit f7b361a

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

Dockerfile

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,15 @@
1-
#multistage build to reduce image size
2-
3-
FROM python:3.10 AS build
1+
FROM python:3.10-slim
42

53
WORKDIR /app
64

7-
COPY flask_app/requirements.txt /app/
8-
9-
#install only neccessary libraries
10-
RUN pip install --no-cache-dir -r requirements.txt
11-
125
COPY flask_app/ /app/
13-
COPY models/vectorizer.pkl /app/models/vectorizer.pkl
146

15-
RUN python -m nltk.downloader stopwords wordnet
16-
17-
#--------------------------------------------------------------------------------------------
18-
19-
FROM python:3.10-slim AS final
7+
COPY models/vectorizer.pkl /app/models/vectorizer.pkl
208

21-
WORKDIR /app
9+
RUN pip install -r requirements.txt
2210

23-
#copy only neccesary files from the build stage
24-
COPY --from=build /app /app
11+
RUN python -m nltk.downloader stopwords wordnet
2512

2613
EXPOSE 5000
2714

28-
CMD ["gunicorn","--bind","0.0.0.0:5000","--timeout","120","app:app"]
15+
CMD ["gunicorn","-b","0.0.0.0:5000","app:app"]

0 commit comments

Comments
 (0)