TDN-M commited on
Commit
e60c4f8
·
verified ·
1 Parent(s): d4608fd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -27
Dockerfile CHANGED
@@ -1,36 +1,31 @@
1
-
2
-
3
  FROM python:3.10-slim
4
 
5
-
6
-
7
  WORKDIR /app
8
 
9
-
10
-
11
- RUN apt-get update && apt-get install -y
12
- ffmpeg
13
- libsm6
14
- libxext6
15
- libxrender-dev
16
- && rm -rf /var/lib/apt/lists/*
17
-
18
-
19
-
20
- COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt || pip install --no-cache-dir
21
- torch
22
- transformers
23
- gradio
24
- moviepy
25
- imageio-ffmpeg
26
-
27
-
28
-
29
  COPY . .
30
 
31
-
32
  ENV pexels_api_key=${pexels_api_key}
33
 
34
-
35
-
36
  CMD ["python", "app.py"]
 
1
+ # Use official Python slim base image
 
2
  FROM python:3.10-slim
3
 
4
+ # Set working directory
 
5
  WORKDIR /app
6
 
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ ffmpeg \
10
+ libsm6 \
11
+ libxext6 \
12
+ libxrender-dev \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ # Copy requirements.txt and install Python dependencies
16
+ COPY requirements.txt .
17
+ RUN pip install --no-cache-dir -r requirements.txt || pip install --no-cache-dir \
18
+ torch \
19
+ transformers \
20
+ gradio \
21
+ moviepy \
22
+ imageio-ffmpeg
23
+
24
+ # Copy the entire project
 
 
25
  COPY . .
26
 
27
+ # Set environment variable for Pexels API key
28
  ENV pexels_api_key=${pexels_api_key}
29
 
30
+ # Command to run the application
 
31
  CMD ["python", "app.py"]