ollama-server / Dockerfile
thewise's picture
Update Dockerfile
52d4d06 verified
raw
history blame
561 Bytes
# Builder stage
FROM ubuntu:latest
RUN apt update && apt install curl -y
RUN curl https://ollama.ai/install.sh | sh
# Create the directory and give appropriate permissions
RUN mkdir -p /.ollama && chmod 777 /.ollama
WORKDIR /.ollama
# Copy the entry point script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Set the entry point script as the default command
ENTRYPOINT ["/entrypoint.sh"]
CMD ["ollama", "serve"]
# Set the model as an environment variable (this can be overridden)
ENV model=llama2
# Expose the server port
EXPOSE 7860