Spaces:
Paused
Paused
| FROM ollama/ollama:latest | |
| # Install Python, Nginx, and core tools | |
| RUN apt-get update && apt-get install -y \ | |
| python3 \ | |
| python3-pip \ | |
| curl \ | |
| nginx \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Streamlit | |
| RUN pip3 install --no-cache-dir streamlit requests --break-system-packages | |
| # Pre-pull model | |
| RUN ollama serve & \ | |
| sleep 5 && \ | |
| ollama pull qwen2.5:0.5b && \ | |
| pkill ollama | |
| # Copy files | |
| COPY app.py /app.py | |
| COPY entrypoint.sh /entrypoint.sh | |
| COPY nginx.conf /etc/nginx/sites-available/default | |
| RUN chmod +x /entrypoint.sh | |
| EXPOSE 7860 | |
| ENTRYPOINT ["/entrypoint.sh"] |