Update Dockerfile
Browse files- Dockerfile +7 -5
Dockerfile
CHANGED
|
@@ -11,17 +11,19 @@ RUN apt-get update && apt-get install -y \
|
|
| 11 |
git \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
-
# Copy requirements
|
| 15 |
COPY requirements.txt .
|
| 16 |
|
| 17 |
-
# Install
|
| 18 |
-
RUN pip install --no-cache-dir -
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
# Copy application
|
| 21 |
COPY app.py .
|
| 22 |
|
| 23 |
-
# Expose Gradio port
|
| 24 |
EXPOSE 7860
|
| 25 |
|
| 26 |
-
# Run the app
|
| 27 |
CMD ["python", "app.py"]
|
|
|
|
| 11 |
git \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
+
# Copy requirements first (for better caching)
|
| 15 |
COPY requirements.txt .
|
| 16 |
|
| 17 |
+
# CRITICAL: Install specific versions (not latest)
|
| 18 |
+
RUN pip install --no-cache-dir torch==2.0.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
|
| 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==4.31.5
|
| 22 |
+
RUN pip install --no-cache-dir soundfile numpy
|
| 23 |
|
| 24 |
# Copy application
|
| 25 |
COPY app.py .
|
| 26 |
|
|
|
|
| 27 |
EXPOSE 7860
|
| 28 |
|
|
|
|
| 29 |
CMD ["python", "app.py"]
|