Skip to content

Commit 46b9f6d

Browse files
committed
fix(intel): Set GPU vendor on Intel images and cleanup
Signed-off-by: Richard Palethorpe <[email protected]>
1 parent 89e61fc commit 46b9f6d

File tree

7 files changed

+15
-44
lines changed

7 files changed

+15
-44
lines changed

.github/workflows/image-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ jobs:
5151
grpc-base-image: "ubuntu:22.04"
5252
runs-on: 'ubuntu-latest'
5353
makeflags: "--jobs=3 --output-sync=target"
54-
- build-type: 'sycl_f16'
54+
- build-type: 'sycl'
5555
platforms: 'linux/amd64'
5656
tag-latest: 'false'
5757
base-image: "quay.io/go-skynet/intel-oneapi-base:latest"
5858
grpc-base-image: "ubuntu:22.04"
59-
tag-suffix: 'sycl-f16'
59+
tag-suffix: 'sycl'
6060
runs-on: 'ubuntu-latest'
6161
makeflags: "--jobs=3 --output-sync=target"
6262
- build-type: 'vulkan'

.github/workflows/image.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,24 +109,15 @@ jobs:
109109
skip-drivers: 'false'
110110
makeflags: "--jobs=4 --output-sync=target"
111111
aio: "-aio-gpu-vulkan"
112-
- build-type: 'sycl_f16'
112+
- build-type: 'sycl'
113113
platforms: 'linux/amd64'
114114
tag-latest: 'auto'
115115
base-image: "quay.io/go-skynet/intel-oneapi-base:latest"
116116
grpc-base-image: "ubuntu:22.04"
117-
tag-suffix: '-gpu-intel-f16'
117+
tag-suffix: '-gpu-intel'
118118
runs-on: 'ubuntu-latest'
119119
makeflags: "--jobs=3 --output-sync=target"
120-
aio: "-aio-gpu-intel-f16"
121-
- build-type: 'sycl_f32'
122-
platforms: 'linux/amd64'
123-
tag-latest: 'auto'
124-
base-image: "quay.io/go-skynet/intel-oneapi-base:latest"
125-
grpc-base-image: "ubuntu:22.04"
126-
tag-suffix: '-gpu-intel-f32'
127-
runs-on: 'ubuntu-latest'
128-
makeflags: "--jobs=3 --output-sync=target"
129-
aio: "-aio-gpu-intel-f32"
120+
aio: "-aio-gpu-intel"
130121

131122
gh-runner:
132123
uses: ./.github/workflows/image_build.yml

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ RUN if [ "${BUILD_TYPE}" = "hipblas" ] && [ "${SKIP_DRIVERS}" = "false" ]; then
100100
ldconfig \
101101
; fi
102102

103+
RUN expr "${BUILD_TYPE}" : sycl && \
104+
echo "intel" > /run/localai/capability || \
105+
echo "Not Intel"
106+
107+
103108
# Cuda
104109
ENV PATH=/usr/local/cuda/bin:${PATH}
105110

Makefile

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ BINARY_NAME=local-ai
55

66
GORELEASER?=
77

8-
ONEAPI_VERSION?=2025.2
9-
108
export BUILD_TYPE?=
119

1210
GO_TAGS?=
@@ -340,19 +338,11 @@ docker-aio-all:
340338

341339
docker-image-intel:
342340
docker build \
343-
--build-arg BASE_IMAGE=intel/oneapi-basekit:${ONEAPI_VERSION}.0-0-devel-ubuntu24.04 \
344-
--build-arg IMAGE_TYPE=$(IMAGE_TYPE) \
345-
--build-arg GO_TAGS="$(GO_TAGS)" \
346-
--build-arg MAKEFLAGS="$(DOCKER_MAKEFLAGS)" \
347-
--build-arg BUILD_TYPE=sycl_f32 -t $(DOCKER_IMAGE) .
348-
349-
docker-image-intel-xpu:
350-
docker build \
351-
--build-arg BASE_IMAGE=intel/oneapi-basekit:${ONEAPI_VERSION}.0-0-devel-ubuntu22.04 \
341+
--build-arg BASE_IMAGE=quay.io/go-skynet/intel-oneapi-base:latest \
352342
--build-arg IMAGE_TYPE=$(IMAGE_TYPE) \
353343
--build-arg GO_TAGS="$(GO_TAGS)" \
354344
--build-arg MAKEFLAGS="$(DOCKER_MAKEFLAGS)" \
355-
--build-arg BUILD_TYPE=sycl_f32 -t $(DOCKER_IMAGE) .
345+
--build-arg BUILD_TYPE=sycl -t $(DOCKER_IMAGE) .
356346

357347
########################################################
358348
## Backends

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,7 @@ docker run -ti --name local-ai -p 8080:8080 --device=/dev/kfd --device=/dev/dri
140140
### Intel GPU Images (oneAPI):
141141

142142
```bash
143-
# Intel GPU with FP16 support
144-
docker run -ti --name local-ai -p 8080:8080 --device=/dev/dri/card1 --device=/dev/dri/renderD128 localai/localai:latest-gpu-intel-f16
145-
146-
# Intel GPU with FP32 support
147-
docker run -ti --name local-ai -p 8080:8080 --device=/dev/dri/card1 --device=/dev/dri/renderD128 localai/localai:latest-gpu-intel-f32
143+
docker run -ti --name local-ai -p 8080:8080 --device=/dev/dri/card1 --device=/dev/dri/renderD128 localai/localai:latest-gpu-intel
148144
```
149145

150146
### Vulkan GPU Images:
@@ -166,7 +162,7 @@ docker run -ti --name local-ai -p 8080:8080 --gpus all localai/localai:latest-ai
166162
docker run -ti --name local-ai -p 8080:8080 --gpus all localai/localai:latest-aio-gpu-nvidia-cuda-11
167163

168164
# Intel GPU version
169-
docker run -ti --name local-ai -p 8080:8080 localai/localai:latest-aio-gpu-intel-f16
165+
docker run -ti --name local-ai -p 8080:8080 localai/localai:latest-aio-gpu-intel
170166

171167
# AMD GPU version
172168
docker run -ti --name local-ai -p 8080:8080 --device=/dev/kfd --device=/dev/dri --group-add=video localai/localai:latest-aio-gpu-hipblas

backend/Dockerfile.golang

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,6 @@ RUN if [ "${BUILD_TYPE}" = "hipblas" ] && [ "${SKIP_DRIVERS}" = "false" ]; then
9696
ldconfig \
9797
; fi
9898

99-
# Intel oneAPI requirements
100-
RUN <<EOT bash
101-
if [[ "${BUILD_TYPE}" == sycl* ]] && [ "${SKIP_DRIVERS}" = "false" ]; then
102-
apt-get update && \
103-
apt-get install -y --no-install-recommends \
104-
intel-oneapi-runtime-libs && \
105-
apt-get clean && \
106-
rm -rf /var/lib/apt/lists/*
107-
fi
108-
EOT
109-
11099
# Install Go
111100
RUN curl -L -s https://go.dev/dl/go${GO_VERSION}.linux-${TARGETARCH}.tar.gz | tar -C /usr/local -xz
112101
ENV PATH=$PATH:/root/go/bin:/usr/local/go/bin:/usr/local/bin

backend/cpp/llama-cpp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ else ifeq ($(BUILD_TYPE),openblas)
2626
# If build type is clblas (openCL) we set -DGGML_CLBLAST=ON -DCLBlast_DIR=/some/path
2727
else ifeq ($(BUILD_TYPE),clblas)
2828
CMAKE_ARGS+=-DGGML_CLBLAST=ON -DCLBlast_DIR=/some/path
29-
# If it's hipblas we do have also to set CC=/opt/rocm/llvm/bin/clang CXX=/opt/rocm/llvm/bin/clang++
29+
# If it's hipblas we do have also to set CC=/opt/rocm/llvm/bin/clang CXX=/opt/rocm/llvm/bin/clang++
3030
else ifeq ($(BUILD_TYPE),hipblas)
3131
ROCM_HOME ?= /opt/rocm
3232
ROCM_PATH ?= /opt/rocm

0 commit comments

Comments
 (0)