| FROM ollama/ollama:latest | |
| # Hugging Face requires apps to run on port 7860 | |
| ENV OLLAMA_HOST=0.0.0.0:7860 | |
| # Fix permissions so Hugging Face can read/write the AI models | |
| RUN chmod -R 777 /.ollama | |
| # Download dolphin-llama3 into the server during the build process | |
| RUN nohup bash -c "ollama serve &" && sleep 5 && ollama pull dolphin-llama3 | |
| # Open the port | |
| EXPOSE 7860 | |
| # Start the AI Server | |
| ENTRYPOINT ["ollama", "serve"] |