| FROM docker.io/ollama/ollama:latest | |
| # Copy the Modelfile | |
| COPY Modelfile_Codette_Ultimate_Clean /tmp/Modelfile | |
| # Copy the GGUF model from parent directory | |
| COPY ../codette_rc_xi_trained.gguf /tmp/codette_rc_xi_trained.gguf | |
| # Expose Ollama API port | |
| EXPOSE 11434 | |
| # Create the model and run Ollama on container start | |
| RUN mkdir -p /root/.ollama/models && \ | |
| chmod +x /entrypoint.sh || true | |
| # Use a shell wrapper to set up model on first run | |
| ENTRYPOINT ["/bin/sh", "-c", "ollama pull codette-ultimate-clean || ollama create codette-ultimate-clean -f /tmp/Modelfile && ollama serve"] | |