| FROM python:3.12-slim | |
| # Install essential system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Install Python packages | |
| RUN pip install --no-cache-dir torch transformers datasets rich huggingface_hub | |
| # Copy all project files | |
| COPY . . | |
| # Expose port (HF Spaces defaults to 7860) | |
| EXPOSE 7860 | |
| ENV PORT=7860 | |
| ENV HOME=/tmp | |
| # Run command center server | |
| CMD ["python", "server.py"] | |