Rakshitjan commited on
Commit
ef01869
·
verified ·
1 Parent(s): 8ccbc9b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -6
Dockerfile CHANGED
@@ -1,16 +1,25 @@
1
- FROM python:3.9
2
 
3
- WORKDIR /code
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  ffmpeg \
7
  && apt-get clean \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
- COPY ./requirements.txt /code/requirements.txt
 
 
11
 
12
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
 
13
 
14
- COPY . .
 
15
 
16
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]
 
 
 
 
 
1
+ FROM python:3.9-slim
2
 
3
+ WORKDIR /app
4
 
5
+ # Install system dependencies (ffmpeg for pydub)
6
  RUN apt-get update && apt-get install -y \
7
  ffmpeg \
8
  && apt-get clean \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Install Python dependencies
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
 
15
+ # Copy application code
16
+ COPY main.py .
17
 
18
+ # Create temp directory
19
+ RUN mkdir -p /app/temp
20
 
21
+ # Expose the port
22
+ EXPOSE 7860
23
+
24
+ # Run the application
25
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]