Hameed13 commited on
Commit
46e40c5
·
verified ·
1 Parent(s): 34e54c3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -5
Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
- # Use Python 3.9 base image
2
- FROM python:3.9-slim
3
 
4
  # Set working directory
5
  WORKDIR /app
@@ -21,10 +21,27 @@ COPY requirements.txt .
21
  # Upgrade pip to latest version
22
  RUN pip install --upgrade pip
23
 
24
- # Install Python dependencies in stages to handle conflicts better
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  RUN pip install --no-cache-dir torch torchaudio --index-url https://download.pytorch.org/whl/cpu
26
- RUN pip install --no-cache-dir fastapi uvicorn[standard] transformers pydantic python-multipart gdown
27
- RUN pip install --no-cache-dir outetts>=0.3.0 uroman protobuf
 
28
 
29
  # Clone and install yarngpt
30
  RUN git clone https://github.com/saheedniyi02/yarngpt.git
 
1
+ # Use Python 3.10 base image (required for outetts)
2
+ FROM python:3.10-slim
3
 
4
  # Set working directory
5
  WORKDIR /app
 
21
  # Upgrade pip to latest version
22
  RUN pip install --upgrade pip
23
 
24
+ # Install system dependencies for audio processing
25
+ RUN apt-get update && apt-get install -y \
26
+ git \
27
+ wget \
28
+ curl \
29
+ build-essential \
30
+ ffmpeg \
31
+ libsndfile1 \
32
+ && rm -rf /var/lib/apt/lists/*
33
+
34
+ # Install gdown for Google Drive downloads
35
+ RUN pip install gdown
36
+
37
+ # Copy requirements first to leverage Docker layer caching
38
+ COPY requirements.txt .
39
+
40
+ # Install core dependencies first
41
  RUN pip install --no-cache-dir torch torchaudio --index-url https://download.pytorch.org/whl/cpu
42
+
43
+ # Install other dependencies
44
+ RUN pip install --no-cache-dir -r requirements.txt
45
 
46
  # Clone and install yarngpt
47
  RUN git clone https://github.com/saheedniyi02/yarngpt.git