Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +12 -10
Dockerfile
CHANGED
@@ -1,22 +1,24 @@
|
|
1 |
-
# Use official Python base image
|
2 |
FROM python:3.11-slim
|
3 |
|
4 |
-
# Set working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
#
|
|
|
|
|
|
|
|
|
|
|
8 |
COPY requirements.txt .
|
9 |
RUN pip install --no-cache-dir -r requirements.txt
|
10 |
|
11 |
-
# Copy
|
12 |
COPY app.py image_fetcher.py video.py video2.py ./
|
13 |
-
RUN apt-get update && apt-get install -y ffmpeg
|
14 |
-
RUN apt-get update && apt-get install -y fonts-liberation
|
15 |
-
RUN apt-get update && apt-get install -y tesseract-ocr
|
16 |
|
|
|
|
|
17 |
|
18 |
-
#
|
19 |
-
|
20 |
|
21 |
-
|
22 |
CMD ["python", "app.py"]
|
|
|
|
|
1 |
FROM python:3.11-slim
|
2 |
|
|
|
3 |
WORKDIR /app
|
4 |
|
5 |
+
# Install system dependencies first
|
6 |
+
RUN apt-get update && \
|
7 |
+
apt-get install -y ffmpeg tesseract-ocr fonts-liberation && \
|
8 |
+
apt-get clean
|
9 |
+
|
10 |
+
# Copy requirements and install Python deps
|
11 |
COPY requirements.txt .
|
12 |
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
14 |
+
# Copy your application code
|
15 |
COPY app.py image_fetcher.py video.py video2.py ./
|
|
|
|
|
|
|
16 |
|
17 |
+
# Make sure these temp folders exist
|
18 |
+
RUN mkdir -p /tmp/images /tmp/sound /tmp/video
|
19 |
|
20 |
+
# Set environment variables if needed (e.g., for Tesseract)
|
21 |
+
ENV PYTHONUNBUFFERED=1
|
22 |
|
23 |
+
EXPOSE 7860
|
24 |
CMD ["python", "app.py"]
|