Muhammadidrees commited on
Commit
49b1475
·
verified ·
1 Parent(s): ed35a92

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +34 -40
Dockerfile CHANGED
@@ -1,51 +1,45 @@
1
- # -------------------------------
2
- # Dockerfile for Voice & Chat AI
3
- # -------------------------------
4
-
5
- # Base image
6
  FROM python:3.10-slim
7
 
8
- # Set environment variables
9
  ENV LANG=C.UTF-8 \
10
  LC_ALL=C.UTF-8 \
11
  PYTHONUNBUFFERED=1 \
12
- PIP_NO_CACHE_DIR=1
13
-
14
- # Install system dependencies
15
- RUN apt-get update && apt-get install -y --no-install-recommends \
16
- build-essential \
17
- ffmpeg \
18
- libsndfile1 \
19
- git \
20
- && rm -rf /var/lib/apt/lists/*
21
-
22
- # Upgrade pip
23
- RUN pip install --upgrade pip
24
-
25
- # Install Python dependencies
26
- RUN pip install \
27
- numpy==1.25.2 \
28
- torch==2.8.1 \
29
- torchaudio==2.8.1 \
30
- torchvision==0.15.2 \
31
- transformers==4.38.0 \
32
- gradio==3.55 \
33
- sounddevice==0.4.6 \
34
- soundfile==0.12.1 \
35
- scipy==1.11 \
36
- datasets==2.13 \
37
- accelerate \
38
- sentencepiece \
39
- pybind11>=2.12
40
-
41
- # Set work directory
42
  WORKDIR /app
43
-
44
- # Copy your application files
45
  COPY . /app
46
 
47
- # Expose port for Gradio or API
48
  EXPOSE 7860
49
 
50
- # Default command to run your app
51
  CMD ["python", "app.py"]
 
1
+ # ===== Base Image =====
 
 
 
 
2
  FROM python:3.10-slim
3
 
4
+ # ===== Environment Variables =====
5
  ENV LANG=C.UTF-8 \
6
  LC_ALL=C.UTF-8 \
7
  PYTHONUNBUFFERED=1 \
8
+ TORCH_CUDA_ARCH_LIST="6.1;7.5;8.6+PTX"
9
+
10
+ # ===== System Dependencies =====
11
+ RUN apt-get update && \
12
+ apt-get install -y --no-install-recommends \
13
+ git \
14
+ wget \
15
+ ffmpeg \
16
+ libsndfile1 \
17
+ build-essential \
18
+ && rm -rf /var/lib/apt/lists/*
19
+
20
+ # ===== Python Dependencies =====
21
+ # Install specific compatible versions
22
+ RUN pip install --no-cache-dir --upgrade pip setuptools wheel
23
+
24
+ RUN pip install --no-cache-dir \
25
+ torch==2.2.0 \
26
+ torchaudio==2.2.0 \
27
+ torchvision==0.15.1 \
28
+ transformers==4.38 \
29
+ gradio>=3.41,<6 \
30
+ sounddevice>=0.4.6 \
31
+ soundfile>=0.12.1 \
32
+ scipy>=1.11 \
33
+ numpy<2 \
34
+ datasets>=2.13 \
35
+ accelerate
36
+
37
+ # ===== Copy App Code =====
38
  WORKDIR /app
 
 
39
  COPY . /app
40
 
41
+ # ===== Expose Port (for Gradio if needed) =====
42
  EXPOSE 7860
43
 
44
+ # ===== Entrypoint =====
45
  CMD ["python", "app.py"]