FROM debian:latest | |
RUN apt-get update && apt-get install -y curl | |
RUN curl -fsSL https://ollama.com/install.sh | sh | |
# Assuming ollama uses /ollama for storage, create the directory and ensure correct permissions | |
RUN mkdir -p /ollama && \ | |
chmod -R 777 /ollama | |
# Alternatively, you could create a specific user to run ollama and adjust file ownership | |
# RUN useradd -m ollamauser | |
# RUN mkdir -p /ollama | |
# RUN chown -R ollamauser:ollamauser /ollama | |
# USER ollamauser | |
EXPOSE 8080 | |
CMD ["ollama", "serve"] |