# Use an official Python image FROM python:3.10 # Install dependencies RUN apt-get update && apt-get install -y curl # Install Ollama RUN curl -fsSL https://ollama.com/install.sh | sh # Start Ollama temporarily and pull the model RUN ollama serve & sleep 5 && ollama pull deepseek-r1:1.5b # Install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy app files COPY . . # Expose necessary ports EXPOSE 11434 8501 # Start both Ollama and Streamlit # CMD ["bash", "-c", "streamlit run app.py --server.port 8501 --server.enableCORS false --server.enableXsrfProtection false"]