Spaces:
Sleeping
Sleeping
File size: 1,787 Bytes
803ca77 0b4a997 5ca135e 0b4a997 803ca77 537ad46 0b4a997 5ca135e b10ce05 5ca135e 0b4a997 803ca77 537ad46 803ca77 970de14 aa56856 e26c954 aa56856 e26c954 aa56856 970de14 94a36fb d2190fb 38f47d1 970de14 d2190fb 94a36fb 98a3cf8 0b4a997 98a3cf8 5ca135e e26c954 970de14 |
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# 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"] |