Maaz1 commited on
Commit
487ef66
·
verified ·
1 Parent(s): 2394ba2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -4
Dockerfile CHANGED
@@ -1,19 +1,27 @@
1
- # Dockerfile
2
  FROM python:3.9-slim
3
 
4
- # Install system dependencies (FFmpeg + build tools)
5
  RUN apt-get update && apt-get install -y \
6
  ffmpeg \
7
  build-essential \
8
  python3-dev \
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
 
 
11
  WORKDIR /app
12
 
13
- # Install Python packages (prefer wheels)
14
  COPY requirements.txt .
15
- RUN pip install --no-cache-dir --prefer-binary -r requirements.txt
 
 
16
 
 
17
  COPY . .
18
 
 
 
 
19
  CMD ["python", "app.py"]
 
 
1
  FROM python:3.9-slim
2
 
3
+ # 1. Install system dependencies + build essentials
4
  RUN apt-get update && apt-get install -y \
5
  ffmpeg \
6
  build-essential \
7
  python3-dev \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
+ # 2. Install wheel package FIRST (critical)
11
+ RUN pip install --upgrade pip wheel setuptools
12
+
13
  WORKDIR /app
14
 
15
+ # 3. Copy requirements and install with NO-BINARY flag
16
  COPY requirements.txt .
17
+ RUN pip install --no-cache-dir \
18
+ --only-binary=:all: \ # Force wheel-only installation
19
+ -r requirements.txt
20
 
21
+ # 4. Copy application code
22
  COPY . .
23
 
24
+ # 5. Set FFmpeg path (for moviepy)
25
+ ENV FFMPEG_BINARY=/usr/bin/ffmpeg
26
+
27
  CMD ["python", "app.py"]