ollama / Dockerfile
noahabebe's picture
Update Dockerfile
07d5bdf verified
raw
history blame
723 Bytes
FROM ubuntu:latest
# Install necessary packages
RUN apt-get update && apt-get install -y curl
# Install Ollama
RUN curl -fsSL https://ollama.com/install.sh | sh
# Set environment variable for Ollama host
ENV OLLAMA_HOST=0.0.0.0
# Create directory for Ollama and set permissions
RUN mkdir -p /.ollama && chmod 777 /.ollama
# Create directory for models and set permissions
RUN mkdir -p /usr/share/ollama/.ollama/models && chmod -R 777 /usr/share/ollama/.ollama/models
# Pull the model during the build process
RUN ollama pull noahabebe/baymax
# Set Ollama models environment variable
ENV OLLAMA_MODELS="/usr/share/ollama/.ollama/models"
# Expose the server port
EXPOSE 7860
# Run the Ollama server
CMD ollama serve