Muhammadidrees commited on
Commit
ed35a92
·
verified ·
1 Parent(s): 92aec69

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +40 -26
Dockerfile CHANGED
@@ -1,37 +1,51 @@
1
- # Use Python 3.10 as base
 
 
 
 
2
  FROM python:3.10-slim
3
 
4
- # Set working directory
5
- WORKDIR /home/user/app
 
 
 
6
 
7
  # Install system dependencies
8
- RUN apt-get update && apt-get install -y \
9
- git \
10
- git-lfs \
11
  ffmpeg \
12
- libsm6 \
13
- libxext6 \
14
- cmake \
15
- rsync \
16
- libgl1 \
17
- portaudio19-dev \
18
- && rm -rf /var/lib/apt/lists/* \
19
- && git lfs install
20
-
21
- # Upgrade pip and clear cache
22
- RUN pip install --upgrade pip && pip cache purge
23
 
24
- # Copy requirements
25
- COPY requirements.txt .
26
 
27
  # Install Python dependencies
28
- RUN pip install --no-cache-dir -r requirements.txt
29
-
30
- # Copy all project files into container
31
- COPY . .
32
-
33
- # Expose port (for Gradio app if you run it)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  EXPOSE 7860
35
 
36
- # Run the app
37
  CMD ["python", "app.py"]
 
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"]