Spaces:
Sleeping
Sleeping
| FROM python:3.9-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| curl \ | |
| procps \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Ollama | |
| RUN curl -fsSL https://ollama.ai/install.sh | sh | |
| # Set working directory | |
| WORKDIR /app | |
| # Install Python dependencies | |
| RUN pip install fastapi uvicorn requests pydantic | |
| # Copy application files | |
| COPY . . | |
| # Expose port | |
| EXPOSE 7860 | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=5m --retries=3 \ | |
| CMD curl -f http://localhost:7860/health || exit 1 | |
| # Start application | |
| CMD ["python", "app.py"] |