maira-chaty / Dockerfile
CyberCoder225's picture
Update Dockerfile
98a3cf8 verified
# Use a standard Python image
FROM python:3.10-slim
# Install system tools needed to build the engine
RUN apt-get update && apt-get install -y \
build-essential \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# Install all the "brains" Maira needs
RUN pip install --no-cache-dir \
flask \
flask-cors \
requests \
huggingface_hub \
llama-cpp-python==0.2.90
# Set the working directory
WORKDIR /app
# --- NEURAL CORE DOWNLOADS ---
# 1. Maira Lite
RUN python3 -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='CyberCoder225/maira-model', filename='SmolLM2-360M-Instruct.Q4_K_M.gguf', local_dir='.')"
# 2. Maira Prime
RUN python3 -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='bartowski/Llama-3.2-1B-Instruct-GGUF', filename='Llama-3.2-1B-Instruct-Q4_K_M.gguf', local_dir='.')"
# 3. Maira Logic
RUN python3 -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='Qwen/Qwen2.5-1.5B-Instruct-GGUF', filename='qwen2.5-1.5b-instruct-q4_k_m.gguf', local_dir='.')"
# 4. Maira Chat
# 4. Maira Chat (Danube) - Corrected filename typo
RUN python3 -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='h2oai/h2o-danube3-500m-chat-GGUF', filename='h2o-danube3-500m-chat-Q4_K_M.gguf', local_dir='.')"
# 5. Maira Art - SWAPPED to Granite 2B (Open Model, no login needed)
RUN python3 -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='bartowski/granite-3.0-2b-instruct-GGUF', filename='granite-3.0-2b-instruct-Q4_K_M.gguf', local_dir='.')"
# Copy all files into the container
COPY . .
# Set environment variable to prevent Python from buffering logs (so you can see them!)
ENV PYTHONUNBUFFERED=1
# Start the engine
EXPOSE 7860
CMD ["python3", "app.py"]