-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (34 loc) · 1.03 KB
/
Dockerfile
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
37
38
39
40
41
42
43
44
45
46
47
48
49
# Use an official Python runtime as a parent image
FROM python:3.8
# Set the working directory to /app
WORKDIR /app
# Install any needed packages specified in requirements.txt
RUN apt-get update && \
apt-get install -y \
--no-install-recommends \
build-essential \
cmake \
wget \
git \
vim \
libev-dev \
ca-certificates && \
rm -rf /var/lib/apt/lists/*
RUN pip install --upgrade pip
RUN git clone https://github.com/stanfordnlp/stanza.git
WORKDIR /app/stanza
RUN pip install -e .
RUN pip install Flask bjoern
# RUN pip install gunicorn asyncio aiohttp
# Copy the current directory contents into the container at /app/stanza
WORKDIR /app/stanza
EXPOSE 5000
COPY . /app/stanza
# Run script.py when the container launches
# CMD ["/usr/local/bin/gunicorn","-w","1","-b","0.0.0.0:5000","--timeout","0", "-k", "sync","script:app"]
CMD ["python", "script.py"]
# CMD ["/usr/local/bin/gunicorn", \
# "-b", "0.0.0.0:5000", \
# "--timeout", "0", \
# "-k", "sync", \
# "script:app"]