Spaces:
Sleeping
Sleeping
Upload 2 files
Browse filesfixed broken depndencies
Files changed (2)
- DockerfileAdded+32
- requirements.txtAdded+8
1234567891011121314151617181920212223242526272829303132# Use Python 3.9
FROM python:3.9
# Set working directory
WORKDIR /app
# Copy requirements
COPY requirements.txt .
# --- FIX START ---
# 1. Install Torch CPU first (So it is available for the next steps)
RUN pip install --no-cache-dir torch==2.5.1 --index-url https://download.pytorch.org/whl/cpu
# 2. Install the Pre-Compiled Graph Libraries (This prevents the build error)
# We point to the specific URL that matches the Torch version above (2.5.1)
RUN pip install --no-cache-dir torch-scatter torch-sparse torch-cluster torch-spline-conv -f https://data.pyg.org/whl/torch-2.5.1+cpu.html
# --- FIX END ---
# 3. Install the rest of the easy requirements
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the app
COPY . .
# Permission fix for caching
RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
# Expose port
EXPOSE 7860
# Run
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]12345678fastapi
uvicorn
numpy
scikit-learn
joblib
pydantic
# We keep the main library, but remove the dependencies that cause errors
torch-geometricDockerfileAdded+32
requirements.txtAdded+8