-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 811 Bytes
/
Dockerfile
File metadata and controls
31 lines (24 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
FROM ubuntu
# Installing packages
RUN apt-get update
RUN apt-get install -y python3-pip
# Setting up work directory
WORKDIR /
# Copying the requirements.txt file
COPY ./requirements.txt requirements.txt
# Installing project dependencies
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN python3 -c "import nltk; nltk.download('stopwords')"
# RUN python3 -m nltk.downloader stopwords
# Copying all the files and folders in the working directory container directory
# COPY ./app.py app.py
# COPY ./gunicorn.sh gunicorn.sh
# ADD ./src src
COPY . .
# Setting up entry point, environment variables, and start command
# ENTRYPOINT [ "python3" ]
# CMD ["app.py"]
# Set $PORT environment variable
ENV PORT 8080
CMD gunicorn --bind :$PORT --workers 2 --threads 8 --timeout 2000 app:app