sumoy47 commited on
Commit
37f83c7
·
verified ·
1 Parent(s): e7a54ec

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -9
Dockerfile CHANGED
@@ -7,28 +7,29 @@ WORKDIR /app
7
  # Copy requirements
8
  COPY requirements.txt .
9
 
10
- # --- STABLE INSTALLATION BLOCK ---
11
- # 1. Install Torch 2.1.2 (Stable CPU version)
 
 
12
  RUN pip install torch==2.1.2 --index-url https://download.pytorch.org/whl/cpu
13
 
14
- # 2. Install PyTorch Geometric Dependencies (Matching Torch 2.1.2)
15
  RUN pip install torch-scatter torch-sparse torch-cluster torch-spline-conv -f https://data.pyg.org/whl/torch-2.1.2+cpu.html
16
 
17
- # 3. Install PyTorch Geometric itself
18
  RUN pip install torch-geometric
19
 
20
- # 4. Install the rest (FastAPI, etc.)
21
  RUN pip install --no-cache-dir -r requirements.txt
22
- # -------------------------------
23
 
24
  # Copy the rest of the app
25
  COPY . .
26
 
27
- # Fix permissions for caching
28
  RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
29
 
30
- # Expose the port
31
  EXPOSE 7860
32
 
33
- # Start the app
34
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
7
  # Copy requirements
8
  COPY requirements.txt .
9
 
10
+ # 1. Install specific NumPy version FIRST to prevent conflicts
11
+ RUN pip install "numpy<2.0.0"
12
+
13
+ # 2. Install Torch 2.1.2 (Stable CPU version)
14
  RUN pip install torch==2.1.2 --index-url https://download.pytorch.org/whl/cpu
15
 
16
+ # 3. Install PyTorch Geometric Dependencies (Matching Torch 2.1.2)
17
  RUN pip install torch-scatter torch-sparse torch-cluster torch-spline-conv -f https://data.pyg.org/whl/torch-2.1.2+cpu.html
18
 
19
+ # 4. Install PyTorch Geometric
20
  RUN pip install torch-geometric
21
 
22
+ # 5. Install the rest (FastAPI, scikit-learn, etc.)
23
  RUN pip install --no-cache-dir -r requirements.txt
 
24
 
25
  # Copy the rest of the app
26
  COPY . .
27
 
28
+ # Fix permissions
29
  RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
30
 
31
+ # Expose port
32
  EXPOSE 7860
33
 
34
+ # Run
35
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]