Muhammadidrees commited on
Commit
0c83b07
·
verified ·
1 Parent(s): 71c3052

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -37
Dockerfile CHANGED
@@ -1,45 +1,25 @@
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"]
 
1
+ # Use official Python base image
2
  FROM python:3.10-slim
3
 
4
+ # Set working directory
5
+ WORKDIR /app
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
+ # Copy requirements
8
+ COPY requirements.txt .
 
9
 
10
+ # Install dependencies
11
+ RUN apt-get update && apt-get install -y \
12
+ build-essential \
13
+ libsndfile1 \
14
+ ffmpeg \
15
+ && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
16
 
17
+ # Install Python packages
18
+ RUN pip install --upgrade pip
19
+ RUN pip install --no-cache-dir -r requirements.txt
20
 
21
+ # Copy app code
22
+ COPY . .
23
 
24
+ # Set default command to run your app
25
  CMD ["python", "app.py"]