From e1da4a4d163338c5b020f95659c438a2d39267c3 Mon Sep 17 00:00:00 2001 From: Adam Gibson Date: Sun, 16 Mar 2025 15:37:06 +0800 Subject: [PATCH 1/5] Allow for user choice of ollama portable zip at build time --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 61d28d8..08be10e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM ubuntu:24.04 ENV DEBIAN_FRONTEND=noninteractive ENV TZ=america/los_angeles +ARG IPEXLLM_PORTABLE_ZIP_FILENAME=ollama-ipex-llm-2.2.0b20250313-ubuntu.tgz # Base packages RUN apt update && \ @@ -24,8 +25,8 @@ RUN mkdir -p /tmp/gpu && \ # Install Ollama Portable Zip RUN cd / && \ - wget https://github.com/mattcurf/ollama-intel-gpu/releases/download/v0.0.1/ollama-0.5.4-ipex-llm-2.2.0b20250220-ubuntu.tgz && \ - tar xvf ollama-0.5.4-ipex-llm-2.2.0b20250220-ubuntu.tgz --strip-components=1 -C / + wget https://github.com/intel/ipex-llm/releases/download/v2.2.0-nightly/${IPEXLLM_PORTABLE_ZIP_FILENAME} && \ + tar xvf ${IPEXLLM_PORTABLE_ZIP_FILENAME} --strip-components=1 -C / ENV OLLAMA_HOST=0.0.0.0:11434 From 2c82aed59ce90120c17c69a743c8d60e23a205d4 Mon Sep 17 00:00:00 2001 From: Adam Gibson Date: Sun, 16 Mar 2025 16:10:20 +0800 Subject: [PATCH 2/5] Update compose file with build args --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 117bac2..e53643c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,6 +3,8 @@ services: build: context: . dockerfile: Dockerfile + args: + IPEXLLM_PORTABLE_ZIP_FILENAME: ollama-ipex-llm-2.2.0b20250313-ubuntu.tgz # update from https://github.com/intel/ipex-llm/releases/tag/v2.2.0-nightly container_name: ollama-intel-gpu restart: always devices: From 1e92fbe88858b2bc00ec8229ec917ab0b259df82 Mon Sep 17 00:00:00 2001 From: Adam Gibson Date: Sun, 16 Mar 2025 16:47:45 +0800 Subject: [PATCH 3/5] Updates to allow latest ollama in compose file, with fallback to cached in Dockerfile (if no build args provided) --- Dockerfile | 9 ++++++--- docker-compose.yml | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 08be10e..fb4c73f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:24.04 ENV DEBIAN_FRONTEND=noninteractive ENV TZ=america/los_angeles -ARG IPEXLLM_PORTABLE_ZIP_FILENAME=ollama-ipex-llm-2.2.0b20250313-ubuntu.tgz + # Base packages RUN apt update && \ @@ -23,9 +23,12 @@ RUN mkdir -p /tmp/gpu && \ dpkg -i *.deb && \ rm *.deb -# Install Ollama Portable Zip +# Install Ollama Portable Zip (with cached default) +ARG IPEXLLM_RELEASE_REPO=mattcurf/ollama-intel-gpu +ARG IPEXLLM_RELEASE_VERSON=v0.0.1 +ARG IPEXLLM_PORTABLE_ZIP_FILENAME=ollama-0.5.4-ipex-llm-2.2.0b20250220-ubuntu.tgz RUN cd / && \ - wget https://github.com/intel/ipex-llm/releases/download/v2.2.0-nightly/${IPEXLLM_PORTABLE_ZIP_FILENAME} && \ + wget https://github.com/${IPEXLLM_RELEASE_REPO}/releases/download/${IPEXLLM_RELEASE_VERSON}/${IPEXLLM_PORTABLE_ZIP_FILENAME} && \ tar xvf ${IPEXLLM_PORTABLE_ZIP_FILENAME} --strip-components=1 -C / ENV OLLAMA_HOST=0.0.0.0:11434 diff --git a/docker-compose.yml b/docker-compose.yml index e53643c..dc2b937 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,6 +4,8 @@ services: context: . dockerfile: Dockerfile args: + IPEXLLM_RELEASE_REPO: intel/ipex-llm + IPEXLLM_RELEASE_VERSON: v2.2.0-nightly IPEXLLM_PORTABLE_ZIP_FILENAME: ollama-ipex-llm-2.2.0b20250313-ubuntu.tgz # update from https://github.com/intel/ipex-llm/releases/tag/v2.2.0-nightly container_name: ollama-intel-gpu restart: always From b33c01f1f0a1ad6d1d28ec67899c43b80036e734 Mon Sep 17 00:00:00 2001 From: Adam Gibson Date: Sun, 16 Mar 2025 16:56:50 +0800 Subject: [PATCH 4/5] Updated README.md for Dockerfile args. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 322ee59..5cdb798 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,10 @@ $ docker compose up Then launch your web browser to http://localhost:3000 to launch the web ui. Create a local OpenWeb UI credential, then click the settings icon in the top right of the screen, then select 'Models', then click 'Show', then download a model like 'llama3.1:8b-instruct-q8_0' for Intel ARC A770 16GB VRAM +## Update to the latest IPEX-LLM Portable Zip Version + +To update to the latest portable zip version of IPEX-LLM's Ollama, update the compose file's `IPEXLLM_PORTABLE_ZIP_FILENAME` build argument to the latest `ollama-*.tgz` release from https://github.com/intel/ipex-llm/releases/tag/v2.2.0-nightly , then rebuild the image. + # References * https://dgpu-docs.intel.com/driver/client/overview.html * https://github.com/intel/ipex-llm/blob/main/docs/mddocs/Quickstart/ollama_portablze_zip_quickstart.md From 451f91080cbfa04f697fe887e18628e3866be5eb Mon Sep 17 00:00:00 2001 From: Adam Gibson Date: Mon, 17 Mar 2025 19:29:53 +0800 Subject: [PATCH 5/5] Revert compose to cached .tgz by default. --- README.md | 13 ++++++++++++- docker-compose.yml | 6 +++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5cdb798..5b0e464 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,18 @@ Then launch your web browser to http://localhost:3000 to launch the web ui. Cre ## Update to the latest IPEX-LLM Portable Zip Version -To update to the latest portable zip version of IPEX-LLM's Ollama, update the compose file's `IPEXLLM_PORTABLE_ZIP_FILENAME` build argument to the latest `ollama-*.tgz` release from https://github.com/intel/ipex-llm/releases/tag/v2.2.0-nightly , then rebuild the image. +To update to the latest portable zip version of IPEX-LLM's Ollama, update the compose file with the build arguments shown below, using the latest `ollama-*.tgz` release from https://github.com/intel/ipex-llm/releases/tag/v2.2.0-nightly , then rebuild the image. + +```yaml +ollama-intel-gpu: + build: + context: . + dockerfile: Dockerfile + args: + IPEXLLM_RELEASE_REPO: intel/ipex-llm + IPEXLLM_RELEASE_VERSON: v2.2.0-nightly + IPEXLLM_PORTABLE_ZIP_FILENAME: ollama-ipex-llm-2.2.0b20250313-ubuntu.tgz +``` # References * https://dgpu-docs.intel.com/driver/client/overview.html diff --git a/docker-compose.yml b/docker-compose.yml index dc2b937..0301a2c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,9 +4,9 @@ services: context: . dockerfile: Dockerfile args: - IPEXLLM_RELEASE_REPO: intel/ipex-llm - IPEXLLM_RELEASE_VERSON: v2.2.0-nightly - IPEXLLM_PORTABLE_ZIP_FILENAME: ollama-ipex-llm-2.2.0b20250313-ubuntu.tgz # update from https://github.com/intel/ipex-llm/releases/tag/v2.2.0-nightly + IPEXLLM_RELEASE_REPO: mattcurf/ollama-intel-gpu + IPEXLLM_RELEASE_VERSON: v0.0.1 + IPEXLLM_PORTABLE_ZIP_FILENAME: ollama-0.5.4-ipex-llm-2.2.0b20250220-ubuntu.tgz container_name: ollama-intel-gpu restart: always devices: