Rakshitjan commited on
Commit
254c2f3
·
verified ·
1 Parent(s): 223f4d4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -10
Dockerfile CHANGED
@@ -1,9 +1,9 @@
1
- FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies
6
- RUN apt-get update && apt-get install -y --no-install-recommends \
7
  ffmpeg \
8
  && apt-get clean \
9
  && rm -rf /var/lib/apt/lists/*
@@ -13,17 +13,13 @@ COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
  # Copy application code
16
- COPY . .
17
 
18
- # Create directories
19
  RUN mkdir -p /app/temp
20
 
21
- # Set environment variables
22
- ENV PYTHONDONTWRITEBYTECODE=1
23
- ENV PYTHONUNBUFFERED=1
24
-
25
  # Expose the port
26
  EXPOSE 7860
27
 
28
- # Run the server
29
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
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/*
 
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"]