Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -25
Dockerfile
CHANGED
|
@@ -1,40 +1,23 @@
|
|
| 1 |
-
# Use an official Python runtime as a parent image
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
# Install system dependencies
|
| 5 |
-
RUN apt-get update && apt-get install -y \
|
| 6 |
-
|
| 7 |
-
libtesseract-dev \
|
| 8 |
-
ffmpeg \
|
| 9 |
-
libsm6 \
|
| 10 |
-
libxext6 \
|
| 11 |
-
libespeak1 \ # <-- Add this line for libespeak.so.1
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
RUN apt-get update && apt-get install -y poppler-utils && rm -rf /var/lib/apt/lists/*
|
| 16 |
-
|
| 17 |
-
# Set environment variables
|
| 18 |
-
ENV LANG C.UTF-8
|
| 19 |
-
|
| 20 |
-
# Create a working directory
|
| 21 |
WORKDIR /app
|
| 22 |
|
| 23 |
-
# Copy
|
| 24 |
COPY requirements.txt .
|
| 25 |
-
|
| 26 |
-
# Upgrade pip and install Python dependencies
|
| 27 |
RUN pip install --upgrade pip
|
| 28 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 29 |
|
| 30 |
-
#
|
| 31 |
-
RUN python -m nltk.downloader punkt
|
| 32 |
-
|
| 33 |
-
# Copy the application code
|
| 34 |
COPY app.py .
|
| 35 |
|
| 36 |
-
# Expose the port Gradio
|
| 37 |
EXPOSE 7860
|
| 38 |
|
| 39 |
-
#
|
| 40 |
CMD ["python", "app.py"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Install system dependencies if needed (you might add more if required)
|
| 4 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
+
gcc \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
&& rm -rf /var/lib/apt/lists/*
|
| 7 |
|
| 8 |
+
# Set work directory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
+
# Copy requirements.txt and install dependencies
|
| 12 |
COPY requirements.txt .
|
|
|
|
|
|
|
| 13 |
RUN pip install --upgrade pip
|
| 14 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 15 |
|
| 16 |
+
# Copy your app code into the container
|
|
|
|
|
|
|
|
|
|
| 17 |
COPY app.py .
|
| 18 |
|
| 19 |
+
# Expose the port used by Gradio (default is 7860)
|
| 20 |
EXPOSE 7860
|
| 21 |
|
| 22 |
+
# Run the app
|
| 23 |
CMD ["python", "app.py"]
|