sreepathi-ravikumar commited on
Commit
6d09b5a
·
verified ·
1 Parent(s): cb65a86

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -18
Dockerfile CHANGED
@@ -1,28 +1,28 @@
1
- # Base image
2
- FROM python:3.10-slim
3
 
4
- # Disable numba JIT to avoid caching issues
5
- ENV NUMBA_DISABLE_JIT=1
 
 
 
 
6
 
7
- # Set working directory
8
  WORKDIR /app
9
 
10
- # Copy app files
11
- COPY app.py .
12
- COPY AudioGeneration.py .
13
  COPY requirements.txt .
 
14
 
15
- # Install dependencies
16
- RUN apt-get update && apt-get install -y \
17
- espeak \
18
- ffmpeg \
19
- && rm -rf /var/lib/apt/lists/*
 
20
 
21
- RUN pip install --upgrade pip
22
- RUN pip install -r requirements.txt
23
 
24
- # Expose port for Spaces
25
- EXPOSE 7860
26
 
27
- # Run the app
28
  CMD ["python", "app.py"]
 
1
+ FROM python:3.9-slim
 
2
 
3
+ # Install system dependencies
4
+ RUN apt-get update && \
5
+ apt-get install -y --no-install-recommends \
6
+ ffmpeg \
7
+ espeak-ng \
8
+ && rm -rf /var/lib/apt/lists/*
9
 
 
10
  WORKDIR /app
11
 
12
+ # Install Python dependencies
 
 
13
  COPY requirements.txt .
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
 
16
+ # Application files
17
+ COPY app.py tts_engine.py ./
18
+
19
+ # Create temp directory
20
+ RUN mkdir -p /app/temp && \
21
+ chmod 777 /app/temp
22
 
23
+ ENV PYTHONUNBUFFERED=1 \
24
+ PORT=7860
25
 
26
+ EXPOSE ${PORT}
 
27
 
 
28
  CMD ["python", "app.py"]