Skip to content

Commit

Permalink
Merge pull request #87 from mecattaf/patch-1
Browse files Browse the repository at this point in the history
Create Containerfile.ollama
  • Loading branch information
castrojo authored May 13, 2024
2 parents ef5a607 + 00f92b8 commit 714d052
Showing 1 changed file with 29 additions and 0 deletions.
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"]

0 comments on commit 714d052

Please sign in to comment.