Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files6 unmodified lines789101112131415161718192021222324252627282930313233346 unmodified lines# Copy requirementsCOPY requirements.txt .# --- STABLE INSTALLATION BLOCK ---# 1. Install Torch 2.1.2 (Stable CPU version)RUN pip install torch==2.1.2 --index-url https://download.pytorch.org/whl/cpu# 2. Install PyTorch Geometric Dependencies (Matching Torch 2.1.2)RUN pip install torch-scatter torch-sparse torch-cluster torch-spline-conv -f https://data.pyg.org/whl/torch-2.1.2+cpu.html# 3. Install PyTorch Geometric itselfRUN pip install torch-geometric# 4. Install the rest (FastAPI, etc.)RUN pip install --no-cache-dir -r requirements.txt# -------------------------------# Copy the rest of the appCOPY . .# Fix permissions for cachingRUN mkdir -p /app/.cache && chmod -R 777 /app/.cache# Expose the portEXPOSE 7860# Start the appCMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]6 unmodified lines78910111213141516171819202122232425262728293031323334356 unmodified lines# Copy requirementsCOPY requirements.txt .# 1. Install specific NumPy version FIRST to prevent conflictsRUN pip install "numpy<2.0.0"# 2. Install Torch 2.1.2 (Stable CPU version)RUN pip install torch==2.1.2 --index-url https://download.pytorch.org/whl/cpu# 3. Install PyTorch Geometric Dependencies (Matching Torch 2.1.2)RUN pip install torch-scatter torch-sparse torch-cluster torch-spline-conv -f https://data.pyg.org/whl/torch-2.1.2+cpu.html# 4. Install PyTorch GeometricRUN pip install torch-geometric# 5. Install the rest (FastAPI, scikit-learn, etc.)RUN pip install --no-cache-dir -r requirements.txt# Copy the rest of the appCOPY . .# Fix permissionsRUN mkdir -p /app/.cache && chmod -R 777 /app/.cache# Expose portEXPOSE 7860# RunCMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
Dockerfile+10-9