Ravishankarsharma commited on
Commit
505a3d0
·
verified ·
1 Parent(s): a274afb

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -13
Dockerfile CHANGED
@@ -1,24 +1,20 @@
1
- # Base image
2
  FROM python:3.10-slim
3
 
4
- # Set working directory
5
  WORKDIR /app
6
 
7
- # Copy requirements first (for caching)
8
- COPY requirements.txt .
9
 
10
- # Install dependencies
 
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Copy app code
14
  COPY . .
15
 
16
- # Create writable cache folder for Whisper
17
- RUN mkdir -p /tmp/.cache && chmod -R 777 /tmp/.cache
18
-
19
  # Expose port
20
- EXPOSE 8000
21
-
22
- # Run FastAPI app with Uvicorn
23
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
24
 
 
 
 
 
1
  FROM python:3.10-slim
2
 
3
+ # Set work directory
4
  WORKDIR /app
5
 
6
+ # Install system dependencies (for ffmpeg required by Whisper)
7
+ RUN apt-get update && apt-get install -y ffmpeg git && rm -rf /var/lib/apt/lists/*
8
 
9
+ # Copy requirements and install
10
+ COPY requirements.txt .
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Copy app files
14
  COPY . .
15
 
 
 
 
16
  # Expose port
17
+ EXPOSE 7860
 
 
 
18
 
19
+ # Run FastAPI app with uvicorn
20
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]