mystic_CBK commited on
Commit
38203fc
Β·
1 Parent(s): 9422e25

SYSTEMATIC FIX: Remove non-existent numpy-base, use proven dependency management

Browse files
Files changed (2) hide show
  1. Dockerfile +5 -11
  2. requirements_hf_spaces.txt +4 -5
Dockerfile CHANGED
@@ -18,19 +18,13 @@ RUN useradd --create-home --shell /bin/bash app && \
18
 
19
  WORKDIR /app
20
 
21
- # CRITICAL: Force NumPy 1.24.3 and prevent ANY upgrades
22
- RUN echo "πŸ”§ FORCING NumPy 1.24.3 (PyTorch 1.13.x compatibility)..." && \
23
- pip install --no-cache-dir --force-reinstall "numpy==1.24.3" && \
24
- pip install --no-cache-dir --force-reinstall "numpy-base==1.24.3" && \
25
- echo "βœ… NumPy 1.24.3 FORCED successfully"
26
-
27
- # Copy requirements and install with NO upgrades
28
  COPY requirements_hf_spaces.txt .
29
 
30
- # Install dependencies with NO upgrades to prevent NumPy conflicts
31
- RUN echo "πŸ”§ Installing dependencies (NO upgrades allowed)..." && \
32
- pip install --no-cache-dir --no-deps --force-reinstall -r requirements_hf_spaces.txt && \
33
- echo "βœ… All dependencies installed with NO upgrades"
34
 
35
  # Clone and install fairseq-signals
36
  RUN echo "πŸ”§ Installing fairseq-signals..." && \
 
18
 
19
  WORKDIR /app
20
 
21
+ # Copy requirements first for better caching
 
 
 
 
 
 
22
  COPY requirements_hf_spaces.txt .
23
 
24
+ # Install dependencies with proper version pinning
25
+ RUN echo "πŸ”§ Installing dependencies with version pinning..." && \
26
+ pip install --no-cache-dir -r requirements_hf_spaces.txt && \
27
+ echo "βœ… Dependencies installed successfully"
28
 
29
  # Clone and install fairseq-signals
30
  RUN echo "πŸ”§ Installing fairseq-signals..." && \
requirements_hf_spaces.txt CHANGED
@@ -1,5 +1,5 @@
1
- # HF Spaces Requirements - CRITICAL FIXES
2
- # Fixed NumPy 2.x and omegaconf compatibility issues
3
 
4
  # Core dependencies - Exact versions
5
  fastapi==0.104.1
@@ -9,16 +9,15 @@ pyyaml==6.0.1
9
  einops==0.7.0
10
  transformers==4.21.0
11
 
12
- # CRITICAL: Force NumPy 1.24.3 and prevent upgrades
13
  numpy==1.24.3
14
- numpy-base==1.24.3
15
 
16
  # PyTorch 1.13.x - Compatible with NumPy 1.21-1.24
17
  torch==1.13.1
18
  torchvision==0.14.1
19
  torchaudio==0.13.1
20
 
21
- # CRITICAL: omegaconf version that actually has is_primitive_type
22
  omegaconf==2.3.0
23
 
24
  # fairseq-signals will be installed from source in Dockerfile
 
1
+ # HF Spaces Requirements - SYSTEMATIC FIX
2
+ # Based on official PyTorch compatibility matrix
3
 
4
  # Core dependencies - Exact versions
5
  fastapi==0.104.1
 
9
  einops==0.7.0
10
  transformers==4.21.0
11
 
12
+ # CRITICAL: NumPy 1.24.3 for PyTorch 1.13.x compatibility
13
  numpy==1.24.3
 
14
 
15
  # PyTorch 1.13.x - Compatible with NumPy 1.21-1.24
16
  torch==1.13.1
17
  torchvision==0.14.1
18
  torchaudio==0.13.1
19
 
20
+ # omegaconf - Version that has is_primitive_type
21
  omegaconf==2.3.0
22
 
23
  # fairseq-signals will be installed from source in Dockerfile