# Use the official Ollama image as the base | |
FROM ollama/ollama:latest | |
# Set the model name (using lightweight all-minilm) | |
ARG OLLAMA_MODEL="all-minilm" | |
# Pull the model during build | |
RUN ollama pull ${OLLAMA_MODEL} | |
# Expose the Ollama API port | |
EXPOSE 11434 | |
# Start the server directly | |
CMD ["ollama", "serve"] |