Spaces:
Sleeping
Sleeping
FIX: Dockerfile
Browse files- Dockerfile +4 -17
Dockerfile
CHANGED
|
@@ -1,24 +1,11 @@
|
|
| 1 |
-
# Use a PyTorch base image with torch already installed
|
| 2 |
FROM pytorch/pytorch:1.9.0-cuda10.2-cudnn7-runtime
|
| 3 |
-
|
| 4 |
-
# Install Stanza
|
| 5 |
-
RUN pip install stanza>=1.2
|
| 6 |
-
|
| 7 |
-
#Define workdir
|
| 8 |
WORKDIR /app
|
| 9 |
-
|
| 10 |
-
# Copy dependency files and install
|
| 11 |
COPY requirements.txt /app/requirements.txt
|
| 12 |
RUN pip install -r requirements.txt
|
| 13 |
-
|
| 14 |
-
# Copie os Stanza resources
|
| 15 |
COPY stanza_resources /app/stanza_resources
|
| 16 |
-
|
| 17 |
-
# Copy the static folder (including jeni.jpg)
|
| 18 |
COPY static /app/static
|
| 19 |
-
|
| 20 |
-
# Copy the remain code
|
| 21 |
COPY . /app
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "1200", "app:app"]
|
|
|
|
|
|
|
| 1 |
FROM pytorch/pytorch:1.9.0-cuda10.2-cudnn7-runtime
|
| 2 |
+
RUN pip install "stanza>=1.2"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
WORKDIR /app
|
|
|
|
|
|
|
| 4 |
COPY requirements.txt /app/requirements.txt
|
| 5 |
RUN pip install -r requirements.txt
|
|
|
|
|
|
|
| 6 |
COPY stanza_resources /app/stanza_resources
|
| 7 |
+
ENV STANZA_RESOURCES_DIR=/app/stanza_resources
|
|
|
|
| 8 |
COPY static /app/static
|
|
|
|
|
|
|
| 9 |
COPY . /app
|
| 10 |
+
ENV PORT=7860
|
| 11 |
+
CMD sh -c 'gunicorn --bind 0.0.0.0:${PORT:-7860} --timeout 1200 app:app'
|
|
|