Skip to content

Commit 0afce27

Browse files
authored
Merge pull request #141 from intel/update-branch
feat: update Dockerfile for new base image and Python environment setup; add CPU configuration instructions to README (#379)
2 parents 57706be + ee885d3 commit 0afce27

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

usecases/ai/microservices/ollama/Dockerfile

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,21 @@
11
# Copyright (C) 2024 Intel Corporation
22
# SPDX-License-Identifier: Apache-2.0
33

4-
FROM intel/oneapi-basekit:2024.2.1-0-devel-ubuntu22.04
4+
FROM intel/oneapi-basekit:2025.0.2-0-devel-ubuntu24.04
5+
ARG IPEX_LLM_VERSION=2.2.0b20250219
56

67
WORKDIR /opt/intel/llm-app
7-
RUN rm -rf /etc/apt/sources.list.d/intel-graphics.list \
8-
&& apt update \
9-
&& apt install -y python3.11 \
10-
python3.11-venv \
8+
RUN apt update \
9+
&& apt install -y python3-venv \
10+
python3-pip \
1111
wget \
1212
&& rm -rf /var/lib/apt/lists/* \
13-
&& python3.11 -m venv .venv
14-
15-
RUN mkdir neo && cd neo \
16-
&& wget https://github.com/intel/intel-graphics-compiler/releases/download/v2.5.6/intel-igc-core-2_2.5.6+18417_amd64.deb \
17-
&& wget https://github.com/intel/intel-graphics-compiler/releases/download/v2.5.6/intel-igc-opencl-2_2.5.6+18417_amd64.deb \
18-
&& wget https://github.com/intel/compute-runtime/releases/download/24.52.32224.5/intel-level-zero-gpu-dbgsym_1.6.32224.5_amd64.ddeb \
19-
&& wget https://github.com/intel/compute-runtime/releases/download/24.52.32224.5/intel-level-zero-gpu_1.6.32224.5_amd64.deb \
20-
&& wget https://github.com/intel/compute-runtime/releases/download/24.52.32224.5/intel-opencl-icd-dbgsym_24.52.32224.5_amd64.ddeb \
21-
&& wget https://github.com/intel/compute-runtime/releases/download/24.52.32224.5/intel-opencl-icd_24.52.32224.5_amd64.deb \
22-
&& wget https://github.com/intel/compute-runtime/releases/download/24.52.32224.5/libigdgmm12_22.5.5_amd64.deb \
23-
&& dpkg -i *.deb
13+
&& python3 -m venv .venv
2414

2515
ENV PATH="/opt/intel/llm-app/.venv/bin:$PATH"
2616
ENV LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH"
2717
RUN python3 -m pip install --upgrade pip \
28-
&& python3 -m pip install --pre --upgrade 'ipex-llm[cpp]==2.2.0b20241216' \
18+
&& python3 -m pip install --pre --upgrade ipex-llm[cpp]==${IPEX_LLM_VERSION} \
2919
&& python3 -m pip install --upgrade accelerate==0.33.0 \
3020
&& init-ollama
3121

usecases/ai/openwebui-ollama/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,17 @@ Example:
117117

118118
![Alt Test](./assets/stt-example.gif)
119119

120+
## FAQ
121+
### 1. Configure Ollama to use CPU instead of GPU
122+
* Linux: Export the environment variable `OLLAMA_NUM_GPU` before starting the services to offload to `CPU` device
123+
```bash
124+
# Default: GPU
125+
export OLLAMA_NUM_GPU=999
126+
127+
# Runs on CPU
128+
export OLLAMA_NUM_GPU=0
129+
```
130+
120131
## Limitations
121132
### 1. Automatic Speech Recognition Compatibility
122133
Automatic speech recognition functionality is not supported in Firefox. Please use Chrome for validated performance.

usecases/ai/openwebui-ollama/docker-compose.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ services:
8888
- app-network
8989
environment:
9090
- OLLAMA_HOST=0.0.0.0:11434
91-
- OLLAMA_NUM_GPU=999
91+
- OLLAMA_NUM_GPU=${OLLAMA_NUM_GPU:-999}
9292
- ZES_ENABLE_SYSMAN=1
93-
- SYCL_CACHE_PERSISTENT=1
9493
- SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1
9594
devices:
9695
- /dev:/dev:rw

0 commit comments

Comments
 (0)