Update Dockerfile
Browse files- Dockerfile +6 -2
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
|
| 3 |
# Install system dependencies
|
| 4 |
RUN apt-get update && apt-get install -y \
|
|
@@ -6,7 +6,11 @@ RUN apt-get update && apt-get install -y \
|
|
| 6 |
&& rm -rf /var/lib/apt/lists/*
|
| 7 |
|
| 8 |
# Install torch 2.4.1 first (required for xcodec2)
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
# Copy requirements and install
|
| 12 |
COPY requirements.txt /tmp/requirements.txt
|
|
|
|
| 1 |
+
FROM python:3.9.3-slim
|
| 2 |
|
| 3 |
# Install system dependencies
|
| 4 |
RUN apt-get update && apt-get install -y \
|
|
|
|
| 6 |
&& rm -rf /var/lib/apt/lists/*
|
| 7 |
|
| 8 |
# Install torch 2.4.1 first (required for xcodec2)
|
| 9 |
+
# Try installing from PyPI directly (may work with Python 3.9 despite version warning)
|
| 10 |
+
RUN pip install --no-cache-dir --upgrade pip && \
|
| 11 |
+
pip install --no-cache-dir torch==2.4.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 || \
|
| 12 |
+
(echo "torch 2.4.1 failed, trying 2.3.1..." && \
|
| 13 |
+
pip install --no-cache-dir torch==2.3.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121)
|
| 14 |
|
| 15 |
# Copy requirements and install
|
| 16 |
COPY requirements.txt /tmp/requirements.txt
|