Spaces:
Runtime error
Runtime error
update Dockerfile
Browse files- Dockerfile +21 -20
Dockerfile
CHANGED
|
@@ -1,20 +1,21 @@
|
|
| 1 |
-
# Use the official Python image from the Docker Hub
|
| 2 |
-
FROM python:3.10.0-slim-buster
|
| 3 |
-
|
| 4 |
-
# Set the working directory in the container
|
| 5 |
-
WORKDIR /app
|
| 6 |
-
|
| 7 |
-
# Copy the current directory contents into the container at /app
|
| 8 |
-
COPY . /app
|
| 9 |
-
|
| 10 |
-
#
|
| 11 |
-
RUN
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
#
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
| 1 |
+
# Use the official Python image from the Docker Hub
|
| 2 |
+
FROM python:3.10.0-slim-buster
|
| 3 |
+
|
| 4 |
+
# Set the working directory in the container
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy the current directory contents into the container at /app
|
| 8 |
+
COPY . /app
|
| 9 |
+
|
| 10 |
+
# Create a directory for NLTK data and set the environment variable
|
| 11 |
+
RUN mkdir -p /app/nltk_data
|
| 12 |
+
ENV NLTK_DATA=/app/nltk_data
|
| 13 |
+
|
| 14 |
+
# Install any needed packages specified in requirements.txt
|
| 15 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
+
|
| 17 |
+
# Make port 7860 available to the world outside this container
|
| 18 |
+
EXPOSE 7860
|
| 19 |
+
|
| 20 |
+
# Command to run the application
|
| 21 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
|