Spaces:
Runtime error
Runtime error
Upload Dockerfile
Browse files- Dockerfile +5 -2
Dockerfile
CHANGED
|
@@ -10,7 +10,9 @@ COPY ./requirements.txt /code/requirements.txt
|
|
| 10 |
# Install Python dependencies
|
| 11 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 12 |
|
| 13 |
-
#
|
|
|
|
|
|
|
| 14 |
RUN python -c "import nltk; nltk.download('punkt')"
|
| 15 |
|
| 16 |
# Copy the rest of your application code into the container
|
|
@@ -20,4 +22,5 @@ COPY . /code/
|
|
| 20 |
EXPOSE 7860
|
| 21 |
|
| 22 |
# The command to run your application using Gunicorn
|
| 23 |
-
|
|
|
|
|
|
| 10 |
# Install Python dependencies
|
| 11 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 12 |
|
| 13 |
+
# --- THIS LINE IS RE-ADDED AND IS CRITICAL ---
|
| 14 |
+
# Download the NLTK 'punkt' package to a standard system location during the build.
|
| 15 |
+
# This runs with higher permissions than the final application.
|
| 16 |
RUN python -c "import nltk; nltk.download('punkt')"
|
| 17 |
|
| 18 |
# Copy the rest of your application code into the container
|
|
|
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
# The command to run your application using Gunicorn
|
| 25 |
+
# Increased timeout for long model loading and inference times.
|
| 26 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "120", "app:app"]
|