FROM ollama/ollama:latest # Force Hugging Face's required port ENV OLLAMA_HOST=0.0.0.0:7860 WORKDIR /app # Install Python 3 so we can run your build script RUN apt-get update && apt-get install -y python3 && rm -rf /var/lib/apt/lists/* # Copy your Modelfile and the Python build script COPY Tools.modelfile /app/Tools.modelfile COPY build_tool.py /app/build_tool.py # RUN THE SCRIPT: This bakes the 4GB model permanently into the image RUN python3 /app/build_tool.py EXPOSE 7860 #CMD ["serve"]