fix: Remove torch from requirements.txt and use flexible versions
- Remove torch/torchaudio/torchvision from requirements.txt (installed separately in Docker) - Use >= instead of == for most packages to avoid version conflicts - Install numpy before other requirements - Add setuptools and wheel to pip upgrade step
This commit is contained in:
@ -15,16 +15,17 @@ RUN apt-get update && apt-get install -y \
|
|||||||
# Copy requirements first for better Docker layer caching
|
# Copy requirements first for better Docker layer caching
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
|
|
||||||
# Upgrade pip first to avoid installation issues
|
# Upgrade pip and install build tools
|
||||||
RUN pip install --upgrade pip
|
RUN pip install --upgrade pip setuptools wheel
|
||||||
|
|
||||||
# Install CUDA-optimized PyTorch FIRST (before other requirements)
|
# Install CUDA-optimized PyTorch FIRST (before other requirements)
|
||||||
# Using latest versions from cu118 index for SpeechBrain 1.0 / pyannote diarization compatibility
|
# Using latest versions from cu118 index for SpeechBrain 1.0 / pyannote diarization compatibility
|
||||||
# Not pinning versions - pip will resolve latest compatible versions from the index
|
RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
|
||||||
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
|
|
||||||
|
# Install numpy first as many packages depend on it
|
||||||
|
RUN pip install --no-cache-dir "numpy>=1.24.0"
|
||||||
|
|
||||||
# Install remaining dependencies from requirements.txt
|
# Install remaining dependencies from requirements.txt
|
||||||
# Skip torch/torchvision/torchaudio since they're already installed
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
# Copy application code
|
# Copy application code
|
||||||
|
|||||||
@ -1,32 +1,30 @@
|
|||||||
# OBS Recording Transcriber Dependencies
|
# OBS Recording Transcriber Dependencies
|
||||||
# Core dependencies with pinned compatible versions
|
# Core dependencies
|
||||||
streamlit==1.26.0
|
streamlit>=1.26.0
|
||||||
moviepy==1.0.3
|
moviepy>=1.0.3
|
||||||
openai-whisper==20231117
|
openai-whisper>=20231117
|
||||||
requests>=2.28.0
|
requests>=2.28.0
|
||||||
humanize>=4.6.0
|
humanize>=4.6.0
|
||||||
|
|
||||||
# PyTorch ecosystem - updated for SpeechBrain 1.0 compatibility
|
# PyTorch ecosystem - DO NOT include here for Docker builds
|
||||||
|
# These are installed separately with CUDA support in Dockerfile.gpu
|
||||||
|
# For local installs: pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
|
||||||
# torchaudio >= 2.1.0 is REQUIRED for diarization to work properly
|
# torchaudio >= 2.1.0 is REQUIRED for diarization to work properly
|
||||||
# NOTE: For Docker GPU builds, these are installed separately from cu118 index
|
|
||||||
torch>=2.1.0
|
|
||||||
torchaudio>=2.1.0
|
|
||||||
torchvision>=0.16.0
|
|
||||||
|
|
||||||
# Transformers ecosystem - compatible versions
|
# Transformers ecosystem
|
||||||
transformers==4.35.0
|
transformers>=4.35.0
|
||||||
tokenizers>=0.14.0
|
tokenizers>=0.14.0
|
||||||
|
|
||||||
# ML dependencies with compatible versions
|
# ML dependencies - use flexible versions for compatibility
|
||||||
numpy==1.24.3
|
numpy>=1.24.0
|
||||||
scipy==1.10.1
|
scipy>=1.10.0
|
||||||
scikit-learn==1.3.0
|
scikit-learn>=1.3.0
|
||||||
|
|
||||||
# Audio processing and ML models
|
# Audio processing and ML models
|
||||||
# Pin speechbrain for stability with pyannote.audio
|
# speechbrain 1.0+ required for pyannote compatibility
|
||||||
speechbrain==1.0.0
|
speechbrain>=1.0.0
|
||||||
pyannote.audio==3.1.1
|
pyannote.audio>=3.1.1
|
||||||
pytorch-lightning==2.1.0
|
pytorch-lightning>=2.0.0
|
||||||
|
|
||||||
# Other dependencies
|
# Other dependencies
|
||||||
iso639>=0.1.4
|
iso639>=0.1.4
|
||||||
|
|||||||
Reference in New Issue
Block a user