karthikeya1212 commited on
Commit
5618b12
·
verified ·
1 Parent(s): db23018

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +44 -10
Dockerfile CHANGED
@@ -1,4 +1,34 @@
1
- # Use official Python 3.11 slim image
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  FROM python:3.11-slim
3
 
4
  # Set working directory
@@ -7,20 +37,24 @@ WORKDIR /app
7
  # Install system dependencies
8
  RUN apt-get update && apt-get install -y --no-install-recommends \
9
  git \
 
 
 
10
  wget \
11
- curl \
12
  unzip \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
- # Copy project files
16
- COPY . .
17
 
18
  # Install Python dependencies
19
- RUN pip install --upgrade pip
20
- RUN pip install -r requirements.txt
 
 
21
 
22
- # Expose port
23
- EXPOSE 8000
24
 
25
- # Run FastAPI with uvicorn
26
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
 
1
+ # # Use official Python 3.11 slim image
2
+ # FROM python:3.11-slim
3
+
4
+ # # Set working directory
5
+ # WORKDIR /app
6
+
7
+ # # Install system dependencies
8
+ # RUN apt-get update && apt-get install -y --no-install-recommends \
9
+ # git \
10
+ # wget \
11
+ # curl \
12
+ # unzip \
13
+ # && rm -rf /var/lib/apt/lists/*
14
+
15
+ # # Copy project files
16
+ # COPY . .
17
+
18
+ # # Install Python dependencies
19
+ # RUN pip install --upgrade pip
20
+ # RUN pip install -r requirements.txt
21
+
22
+ # # Expose port
23
+ # EXPOSE 8000
24
+
25
+ # # Run FastAPI with uvicorn
26
+ # CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
27
+
28
+
29
+
30
+
31
+ # Use Python 3.11 slim
32
  FROM python:3.11-slim
33
 
34
  # Set working directory
 
37
  # Install system dependencies
38
  RUN apt-get update && apt-get install -y --no-install-recommends \
39
  git \
40
+ ffmpeg \
41
+ libgl1 \
42
+ libglib2.0-0 \
43
  wget \
 
44
  unzip \
45
  && rm -rf /var/lib/apt/lists/*
46
 
47
+ # Copy requirements first for caching
48
+ COPY requirements.txt .
49
 
50
  # Install Python dependencies
51
+ RUN pip install --no-cache-dir -r requirements.txt
52
+
53
+ # Copy project files
54
+ COPY . .
55
 
56
+ # Expose API port for HF Spaces
57
+ EXPOSE 7860
58
 
59
+ # Start FastAPI with uvicorn
60
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]