jisaacso219 commited on
Commit
e70596d
·
verified ·
1 Parent(s): d9ca299

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
  # Install system dependencies
4
- RUN apt-get update && apt-get install -y espeak ffmpeg git && rm -rf /var/lib/apt/lists/*
 
 
5
 
6
- # Set working directory
7
  WORKDIR /app
8
 
9
- # Copy files
10
  COPY . .
11
 
12
  # Install Python dependencies
13
- RUN pip install --upgrade pip && pip install -r requirements.txt
 
14
 
15
- # Expose the port used by Flask
16
  EXPOSE 7860
17
 
18
- # Run your app
19
  CMD ["python", "app.py"]
 
1
+ # Base Python image
2
  FROM python:3.10-slim
3
 
4
+ # Set environment vars
5
+ ENV NUMBA_CACHE_DIR=/tmp/numba_cache \
6
+ PYTHONUNBUFFERED=1 \
7
+ HF_HUB_DISABLE_SYMLINKS_WARNING=1
8
+
9
  # Install system dependencies
10
+ RUN apt-get update && apt-get install -y \
11
+ ffmpeg libsndfile1 libgl1 git \
12
+ && apt-get clean
13
 
14
+ # Set workdir
15
  WORKDIR /app
16
 
17
+ # Copy all app files
18
  COPY . .
19
 
20
  # Install Python dependencies
21
+ RUN pip install --upgrade pip && \
22
+ pip install -r requirements.txt
23
 
24
+ # Expose port
25
  EXPOSE 7860
26
 
27
+ # Run Flask app
28
  CMD ["python", "app.py"]