From 7ba3aefdeee1f87f022428a6de68b1d230a9dd3e Mon Sep 17 00:00:00 2001 From: Balaji Alwar Date: Tue, 2 Jul 2024 15:31:28 -0700 Subject: [PATCH] Adding ollama models as part of extracontainer stanza --- deployments/dev/config/common.yaml | 13 +++++++++++++ deployments/dev/images/default/postBuild | 10 ---------- 2 files changed, 13 insertions(+), 10 deletions(-) delete mode 100644 deployments/dev/images/default/postBuild diff --git a/deployments/dev/config/common.yaml b/deployments/dev/config/common.yaml index f0c49b1de..dcfbbe45c 100644 --- a/deployments/dev/config/common.yaml +++ b/deployments/dev/config/common.yaml @@ -63,6 +63,19 @@ jupyterhub: # Unset NotebookApp from hub/values. Necessary for recent lab versions. JUPYTERHUB_SINGLEUSER_APP: "jupyter_server.serverapp.ServerApp" defaultUrl: /lab + # Run the ollama model as part of the user pod + # https://jupyterhub-kubespawner.readthedocs.io/en/latest/spawner.html#kubespawner.KubeSpawner.extra_containers + extraContainers: + - name: ollama-phi3-container + image: phi3:latest + command: ["ollama", "run", "phi3"] + ports: + - containerPort: 5000 + - name: ollama-tinyllama-container + image: tinyllama:latest + command: ["ollama", "run", "tinyllama"] + ports: + - containerPort: 5001 profileList: - display_name: "Dockerfile image" description: "This is the original dev image." diff --git a/deployments/dev/images/default/postBuild b/deployments/dev/images/default/postBuild deleted file mode 100644 index c974fa225..000000000 --- a/deployments/dev/images/default/postBuild +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -# Pull and run the Ollama Docker images - https://hub.docker.com/r/ollama/ollama -docker pull ollama/phi3 -docker pull ollama/tinyllama - -# Start the Ollama containers -docker run -d --name phi3_container ollama/phi3 -docker run -d --name tinyllama_container ollama/tinyllama -