sreepathi-ravikumar commited on
Commit
95cb67b
·
verified ·
1 Parent(s): 4c52622

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -6
Dockerfile CHANGED
@@ -1,19 +1,28 @@
 
1
  FROM python:3.10-slim
2
 
3
- # Set environment variable to disable numba caching
4
  ENV NUMBA_DISABLE_JIT=1
5
 
6
- # Create app directory
7
  WORKDIR /app
8
 
9
- # Copy files
10
- COPY requirements.txt .
11
  COPY app.py .
12
  COPY AudioGeneration.py .
 
13
 
14
  # Install dependencies
15
- RUN apt-get update && apt-get install -y ffmpeg espeak-ng libespeak-ng1 && \
16
- pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
 
 
 
17
 
18
  # Run the app
19
  CMD ["python", "app.py"]
 
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"]