Spaces:
Sleeping
Sleeping
mystic_CBK
commited on
Commit
Β·
38203fc
1
Parent(s):
9422e25
SYSTEMATIC FIX: Remove non-existent numpy-base, use proven dependency management
Browse files- Dockerfile +5 -11
- 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 |
-
#
|
| 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
|
| 31 |
-
RUN echo "π§ Installing dependencies
|
| 32 |
-
pip install --no-cache-dir
|
| 33 |
-
echo "β
|
| 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 -
|
| 2 |
-
#
|
| 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:
|
| 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 |
-
#
|
| 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
|