Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| # Install system dependencies (ADD procps for process checking) | |
| RUN apt-get update && apt-get install -y \ | |
| curl \ | |
| procps \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Ollama | |
| RUN curl -fsSL https://ollama.com/install.sh | sh | |
| WORKDIR /app | |
| # Copy requirements and install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application files | |
| COPY . . | |
| RUN chmod +x start.sh | |
| # REMOVE these ENV lines (let start.sh handle them) | |
| # ENV OLLAMA_HOME=/tmp/ollama | |
| # ENV OLLAMA_MODELS=/tmp/ollama/models | |
| # ENV OLLAMA_HOST=0.0.0.0:11434 | |
| # ENV OLLAMA_ORIGINS=* | |
| EXPOSE 7860 | |
| CMD ["/app/start.sh"] | |