# Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker # you will also find guides on how best to write your Dockerfile FROM python:3.9-slim WORKDIR /app # Install required packages COPY requirements.txt requirements.txt RUN pip install --no-cache-dir --upgrade -r requirements.txt # Copy data file first COPY data.csv . # Then copy the rest of the application files COPY . . # Create a directory for model storage with proper permissions RUN mkdir -p /tmp/models && \ chmod 777 /tmp/models # Debug: List all files and permissions RUN ls -la && ls -la /tmp/models # Use Uvicorn server with appropriate logging CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--log-level", "debug"]