Skip to content

Commit 38b243a

Browse files
committed
chore: configure localai docker service to use GPU image
1 parent 161a3a0 commit 38b243a

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

compose.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ services:
195195
- reverseproxy
196196

197197
localai.liexp.dev:
198-
image: localai/localai:master-aio-cpu
198+
# image: localai/localai:master-aio-cpu
199199
# For Intel GPUs decomment the following:
200-
# image: localai/localai:latest-aio-gpu-intel
200+
image: localai/localai:latest-aio-gpu-intel
201201
healthcheck:
202202
test: ["CMD", "curl", "-f", "http://localhost:8080/readyz"]
203203
interval: 1m
@@ -213,16 +213,24 @@ services:
213213
VIRTUAL_PORT: 8080
214214
LOCALAI_CORS: 0
215215
LOCALAI_SINGLE_ACTIVE_BACKEND: "true"
216+
# Intel GPU optimization settings
217+
SYCL_DEVICE_FILTER: level_zero
218+
NEOReadDebugKeys: 1
219+
ClDeviceGlobalMemCacheType: 1
216220
env_file:
217221
- ./services/ai-bot/.env.local
218222
volumes:
219223
- ./localai/models:/models:cached
220224
- ./localai/backends:/backends:cached
221-
# devices:
222-
# - /dev/dri
225+
devices:
226+
# Intel GPU device access - required for hardware acceleration
227+
- /dev/dri/card1:/dev/dri/card1
228+
- /dev/dri/renderD128:/dev/dri/renderD128
223229
networks:
224230
- reverseproxy
225-
cpu_count: 2
231+
cpu_count: 4
232+
# Increase memory limit for GPU workloads
233+
mem_limit: 16G
226234

227235
volumes:
228236
db-data: {}

0 commit comments

Comments
 (0)