-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (26 loc) · 1.19 KB
/
Dockerfile
File metadata and controls
36 lines (26 loc) · 1.19 KB
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
32
33
34
35
36
# The first instruction is what image we want to base our container on
# We Use an official Python runtime as a parent image
FROM python:3.6
# The enviroment variable ensures that the python output is set straight
# to the terminal with out buffering it first
ENV PYTHONUNBUFFERED 1
# create root directory for our project in the container
RUN mkdir /TwitterAnalysis
# Copy the current directory contents into the container at /TwitterAnalysis
ADD . /TwitterAnalysis/
# Set the working directory to /TwitterAnalysis/model_setup
WORKDIR /TwitterAnalysis/model_setup
# Install any needed packages specified in setup.py
RUN pip install -e .
# Set the working directory to /TwitterAnalysis/model_setup
WORKDIR /TwitterAnalysis
# Install spacy language model
RUN python -m spacy download en
# expose the port 8000
EXPOSE 8000
# define the default command to run when starting the container using Django
# Uncomment the next two lines to use django to render app and comment gunicorn command
# ENTRYPOINT ["python", "manage.py"]
# CMD ["runserver", "0.0.0.0:8000"]
# define the default command to run when starting the container using gunicorn
CMD ["gunicorn", "--bind", ":8000", "TwitterAnalysis.wsgi:application"]