File size: 677 Bytes
b86ec86
 
 
3aab140
b86ec86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM python:3.11-slim

# Install system dependencies
RUN apt-get update && apt-get install -y curl zstd && rm -rf /var/lib/apt/lists/*

# Install Ollama
RUN curl -fsSL https://ollama.com/install.sh | sh

# Set working directory
WORKDIR /app

# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy application code
COPY main.py .

# Expose port 7860 (HF Space default)
EXPOSE 7860

# Script to start Ollama and then the FastAPI app
RUN echo '#!/bin/bash\nollama serve & sleep 5 && ollama pull aiasistentworld/Kimi-VL-A3B-Thinking-2506-LLM:latest && python main.py' > start.sh
RUN chmod +x start.sh

CMD ["./start.sh"]