sreepathi-ravikumar commited on
Commit
fc6863a
·
verified ·
1 Parent(s): f028ecd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -11
Dockerfile CHANGED
@@ -1,24 +1,26 @@
 
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"]
 
1
+ # Use official Python base image
2
  FROM python:3.11-slim
3
 
4
+ # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install system packages required
8
  RUN apt-get update && \
9
+ apt-get install -y ffmpeg fonts-liberation tesseract-ocr && \
10
+ apt-get clean && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Create required directories with proper permissions
13
+ RUN mkdir -p /tmp/images /tmp/sound /tmp/video && chmod -R 777 /tmp
14
+
15
+ # Copy requirements and install Python packages
16
  COPY requirements.txt .
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
+ # Copy the rest of your application code
20
  COPY app.py image_fetcher.py video.py video2.py ./
21
 
22
+ # Expose your application port
 
 
 
 
 
23
  EXPOSE 7860
24
+
25
+ # Run your Flask app
26
  CMD ["python", "app.py"]