Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Containerfile.ollama #87

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions toolboxes/ollama-toolbox/Containerfile.ollama
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Use the customized bluefin-cli as the base image
ARG SOURCE_IMAGE_NAME="${SOURCE_IMAGE_NAME:-wolfi-toolbox}"
ARG SOURCE_IMAGE_REGISTRY="${SOURCE_IMAGE_REGISTRY:-ghcr.io/ublue-os}"
ARG SOURCE_IMAGE="${SOURCE_IMAGE_REGISTRY}/${SOURCE_IMAGE_NAME}"

FROM $SOURCE_IMAGE:latest

# Metadata
LABEL description="A container image with integrated Ollama and OpenWebUI for development environments."

# Install Homebrew packages (assuming the base image is set up for Homebrew)
RUN brew install gum && \
brew install ollama

# Setup Ollama environment
RUN mkdir -p /opt/ollama

# Pull the OpenWebUI container image and configure it
RUN podman pull ghcr.io/open-webui/open-webui:latest && \
podman create --name ollama-web -e OLLAMA_BASE_URL=http://localhost:11434 \
-e WEBUI_SECRET_KEY=abc123 -e DEFAULT_USER_ROLE=admin -e ENABLE_SIGNUP=true \
-p 8080:8080 ghcr.io/open-webui/open-webui:latest

# Expose ports for Ollama and OpenWebUI
EXPOSE 11434 8080

# Configure entrypoint and command to keep the container running and services operational
ENTRYPOINT ["podman", "systemd", "--user"]
CMD ["--keep-running"]