Fix torch CPU install index
Browse files- Dockerfile +4 -1
Dockerfile
CHANGED
|
@@ -16,7 +16,10 @@ ENV HOME=/home/user \
|
|
| 16 |
TORCH_HOME=/app/torch_cache
|
| 17 |
WORKDIR /app
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
| 20 |
# numpy<2: tflite-runtime is compiled against the numpy 1.x ABI.
|
| 21 |
RUN pip install --user "numpy<2" fastapi uvicorn python-multipart pyyaml soundfile soxr einops rotary-embedding-torch
|
| 22 |
RUN pip install --user "basic-pitch==0.4.0" "numpy<2"
|
|
|
|
| 16 |
TORCH_HOME=/app/torch_cache
|
| 17 |
WORKDIR /app
|
| 18 |
|
| 19 |
+
# --extra-index-url (not --index-url): torch's own dependencies must still
|
| 20 |
+
# resolve from PyPI — the CPU wheel index alone lacks build tools like flit_core.
|
| 21 |
+
RUN pip install --user --upgrade pip && \
|
| 22 |
+
pip install --user torch==2.4.1 torchaudio==2.4.1 --extra-index-url https://download.pytorch.org/whl/cpu
|
| 23 |
# numpy<2: tflite-runtime is compiled against the numpy 1.x ABI.
|
| 24 |
RUN pip install --user "numpy<2" fastapi uvicorn python-multipart pyyaml soundfile soxr einops rotary-embedding-torch
|
| 25 |
RUN pip install --user "basic-pitch==0.4.0" "numpy<2"
|