Update Dockerfile
Browse files- Dockerfile +25 -5
Dockerfile
CHANGED
|
@@ -9,21 +9,41 @@ RUN apt-get update && apt-get install -y \
|
|
| 9 |
ffmpeg \
|
| 10 |
libsndfile1 \
|
| 11 |
git \
|
|
|
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
-
# Copy requirements
|
| 15 |
COPY requirements.txt .
|
| 16 |
|
| 17 |
-
# CRITICAL: Install specific
|
| 18 |
-
RUN pip install --no-cache-dir
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
RUN pip install --no-cache-dir transformers==4.35.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
RUN pip install --no-cache-dir accelerate==0.24.1
|
| 21 |
-
RUN pip install --no-cache-dir gradio==
|
| 22 |
-
RUN pip install --no-cache-dir soundfile
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
# Copy application
|
| 25 |
COPY app.py .
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
EXPOSE 7860
|
| 28 |
|
|
|
|
| 29 |
CMD ["python", "app.py"]
|
|
|
|
| 9 |
ffmpeg \
|
| 10 |
libsndfile1 \
|
| 11 |
git \
|
| 12 |
+
curl \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
+
# Copy requirements
|
| 16 |
COPY requirements.txt .
|
| 17 |
|
| 18 |
+
# CRITICAL: Install specific compatible versions
|
| 19 |
+
RUN pip install --no-cache-dir --upgrade pip
|
| 20 |
+
|
| 21 |
+
# Install PyTorch CPU version (since you have 2 vCPU)
|
| 22 |
+
RUN pip install --no-cache-dir torch==2.0.1 --index-url https://download.pytorch.org/whl/cpu
|
| 23 |
+
|
| 24 |
+
# Install transformers with specific version
|
| 25 |
RUN pip install --no-cache-dir transformers==4.35.0
|
| 26 |
+
|
| 27 |
+
# Install huggingface_hub compatible version
|
| 28 |
+
RUN pip install --no-cache-dir huggingface_hub==0.19.4
|
| 29 |
+
|
| 30 |
+
# Install other dependencies in correct order
|
| 31 |
RUN pip install --no-cache-dir accelerate==0.24.1
|
| 32 |
+
RUN pip install --no-cache-dir gradio==3.50.2
|
| 33 |
+
RUN pip install --no-cache-dir soundfile==0.12.1
|
| 34 |
+
RUN pip install --no-cache-dir numpy==1.24.3
|
| 35 |
+
RUN pip install --no-cache-dir sentencepiece==0.1.99
|
| 36 |
+
RUN pip install --no-cache-dir protobuf==3.20.3
|
| 37 |
+
RUN pip install --no-cache-dir librosa
|
| 38 |
|
| 39 |
# Copy application
|
| 40 |
COPY app.py .
|
| 41 |
|
| 42 |
+
# Create cache directory
|
| 43 |
+
RUN mkdir -p /root/.cache/huggingface
|
| 44 |
+
|
| 45 |
+
# Expose port
|
| 46 |
EXPOSE 7860
|
| 47 |
|
| 48 |
+
# Run
|
| 49 |
CMD ["python", "app.py"]
|