FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive ENV MODEL_NAME="qwen2.5:0.5b" ENV OLLAMA_HOST="0.0.0.0:11434" # Install dependencies RUN apt-get update && apt-get install -y \ build-essential \ libcurl4-openssl-dev \ libcjson-dev \ curl \ python3 \ python3-pip \ git \ zstd \ && rm -rf /var/lib/apt/lists/* # Install Ollama RUN curl -fsSL https://ollama.com/install.sh | sh # Python deps RUN pip3 install --upgrade pip \ && pip3 install streamlit requests # Working directory WORKDIR /workspace # Copy entire repo COPY . /workspace/ # Compile C++ app RUN g++ -std=c++17 -I/usr/include/cjson -o /workspace/pencilclaw /workspace/pencilclaw.cpp -lcurl -lcjson # Data folder RUN mkdir -p /workspace/pencil_data RUN chmod +x /workspace/pencilclaw RUN chmod +x /workspace/entrypoint.sh # HF Spaces port EXPOSE 7860 CMD ["/workspace/entrypoint.sh"]