Muhammadidrees commited on
Commit
f40e934
·
verified ·
1 Parent(s): 6068b3b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -11
Dockerfile CHANGED
@@ -1,25 +1,29 @@
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"]
 
1
+ # Use official PyTorch image with CUDA support if GPU, or CPU-only
2
+ ARG BASE_IMAGE=python:3.10-slim
3
+ FROM ${BASE_IMAGE}
4
 
5
  # Set working directory
6
  WORKDIR /app
7
 
8
+ # Install system dependencies
 
 
 
9
  RUN apt-get update && apt-get install -y \
10
+ git \
 
11
  ffmpeg \
12
+ libsndfile1 \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
+ # Copy requirements
16
+ COPY requirements.txt .
17
+
18
+ # Install Python dependencies
19
+ RUN pip install --no-cache-dir --upgrade pip
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
22
  # Copy app code
23
  COPY . .
24
 
25
+ # Expose port for Gradio
26
+ EXPOSE 7860
27
+
28
+ # Start the app
29
  CMD ["python", "app.py"]