abiyyufahri commited on
Commit
5057a68
·
1 Parent(s): f1199d3

Install error fix attemp 10

Browse files
Files changed (2) hide show
  1. Dockerfile +4 -3
  2. requirements.txt +2 -1
Dockerfile CHANGED
@@ -20,8 +20,8 @@ COPY --chown=user requirements.txt ./
20
  RUN pip install --upgrade pip && \
21
  pip install --no-cache-dir packaging ninja wheel setuptools
22
 
23
- # Install NumPy 1.x to avoid compatibility issues
24
- RUN pip install --no-cache-dir "numpy>=1.21.0,<2.0.0"
25
 
26
  # Install PyTorch CPU version (compatible with NumPy 1.x)
27
  RUN pip install --no-cache-dir torch==2.2.2+cpu torchvision==0.17.2+cpu torchaudio==2.2.2+cpu \
@@ -38,7 +38,8 @@ RUN pip install --no-cache-dir \
38
  # Install FastAPI and related packages
39
  RUN pip install --no-cache-dir \
40
  fastapi \
41
- "uvicorn[standard]"
 
42
 
43
  # Install other dependencies (skip problematic ones)
44
  RUN pip install --no-cache-dir \
 
20
  RUN pip install --upgrade pip && \
21
  pip install --no-cache-dir packaging ninja wheel setuptools
22
 
23
+ # Force install NumPy 1.x first to avoid compatibility issues
24
+ RUN pip install --no-cache-dir --force-reinstall "numpy==1.24.3"
25
 
26
  # Install PyTorch CPU version (compatible with NumPy 1.x)
27
  RUN pip install --no-cache-dir torch==2.2.2+cpu torchvision==0.17.2+cpu torchaudio==2.2.2+cpu \
 
38
  # Install FastAPI and related packages
39
  RUN pip install --no-cache-dir \
40
  fastapi \
41
+ "uvicorn[standard]" \
42
+ python-multipart
43
 
44
  # Install other dependencies (skip problematic ones)
45
  RUN pip install --no-cache-dir \
requirements.txt CHANGED
@@ -5,7 +5,7 @@ wheel
5
  setuptools
6
 
7
  # NumPy version that's compatible with PyTorch and transformers
8
- numpy>=1.21.0,<2.0.0
9
 
10
  # PyTorch CPU version (will be installed via Dockerfile)
11
  # torch==2.2.2+cpu
@@ -15,6 +15,7 @@ numpy>=1.21.0,<2.0.0
15
  # FastAPI and related
16
  fastapi
17
  uvicorn[standard]
 
18
 
19
  # Transformers and ML dependencies
20
  transformers>=4.37.0
 
5
  setuptools
6
 
7
  # NumPy version that's compatible with PyTorch and transformers
8
+ numpy==1.24.3
9
 
10
  # PyTorch CPU version (will be installed via Dockerfile)
11
  # torch==2.2.2+cpu
 
15
  # FastAPI and related
16
  fastapi
17
  uvicorn[standard]
18
+ python-multipart
19
 
20
  # Transformers and ML dependencies
21
  transformers>=4.37.0