Aswinthmani commited on
Commit
e7d8eb3
·
verified ·
1 Parent(s): 47542e6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -4
Dockerfile CHANGED
@@ -1,9 +1,26 @@
1
- FROM python:3.9
 
2
 
 
 
 
 
 
 
 
3
  WORKDIR /app
4
- COPY . .
5
 
6
- RUN pip install --no-cache-dir --upgrade pip
 
 
 
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
9
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
 
1
+ # Use official Python image
2
+ FROM python:3.9-slim
3
 
4
+ # Install system dependencies
5
+ RUN apt-get update && apt-get install -y \
6
+ ffmpeg \
7
+ libsndfile1 \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Set working directory
11
  WORKDIR /app
 
12
 
13
+ # Copy requirements first to leverage Docker cache
14
+ COPY requirements.txt .
15
+
16
+ # Install Python dependencies
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
+ # Copy application code
20
+ COPY . .
21
+
22
+ # Expose port
23
+ EXPOSE 8000
24
+
25
+ # Start application
26
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]