fix: Dockerfile uses explicit pip install, skip pre-installed packages
Removed librosa (unused), torch, pyyaml from install list since they're in the base image. Avoid numpy rebuild conflict. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,12 +6,20 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ffmpeg \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Python dependencies
|
||||
COPY requirements.txt /tmp/requirements.txt
|
||||
RUN pip install --no-cache-dir --break-system-packages -r /tmp/requirements.txt && rm /tmp/requirements.txt
|
||||
# Install Python dependencies (torch, numpy, pyyaml already in base image)
|
||||
RUN pip install --no-cache-dir --break-system-packages \
|
||||
"fastapi>=0.115.0" \
|
||||
"uvicorn[standard]>=0.34.0" \
|
||||
"python-multipart>=0.0.18" \
|
||||
"transformers>=5.4.0" \
|
||||
"chatterbox-tts>=0.1.0" \
|
||||
"soundfile>=0.12.0" \
|
||||
"sentencepiece>=0.2.0" \
|
||||
"protobuf>=5.0.0"
|
||||
|
||||
# llama-cpp-python needs CUDA build
|
||||
RUN CMAKE_ARGS="-DGGML_CUDA=on" pip install --no-cache-dir --break-system-packages --force-reinstall llama-cpp-python>=0.3.0
|
||||
# llama-cpp-python needs separate CUDA build
|
||||
RUN CMAKE_ARGS="-DGGML_CUDA=on" pip install --no-cache-dir --break-system-packages \
|
||||
"llama-cpp-python>=0.3.0"
|
||||
|
||||
# Copy application code
|
||||
COPY llmux/ /app/llmux/
|
||||
|
||||
@@ -3,22 +3,18 @@ fastapi>=0.115.0
|
||||
uvicorn[standard]>=0.34.0
|
||||
python-multipart>=0.0.18
|
||||
|
||||
# AI runtimes
|
||||
torch>=2.7.0
|
||||
# AI runtimes (torch pre-installed in base image)
|
||||
transformers>=5.4.0
|
||||
llama-cpp-python>=0.3.0
|
||||
chatterbox-tts>=0.1.0
|
||||
|
||||
# Audio processing
|
||||
soundfile>=0.12.0
|
||||
librosa>=0.10.0
|
||||
|
||||
# Config & utilities
|
||||
pyyaml>=6.0
|
||||
# Config & utilities (pyyaml pre-installed in base image)
|
||||
sentencepiece>=0.2.0
|
||||
protobuf>=5.0.0
|
||||
|
||||
# Testing
|
||||
# Testing (only needed for development)
|
||||
pytest>=8.0.0
|
||||
pytest-asyncio>=0.24.0
|
||||
httpx>=0.28.0
|
||||
|
||||
Reference in New Issue
Block a user