Skip to content

Commit a36d2cc

Browse files
committed
Fix GPU spec.
1 parent 5aab17c commit a36d2cc

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

docker-compose.components.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -158,19 +158,14 @@ services:
158158
build: ${OPENMPF_PROJECTS_PATH}/openmpf-components/python/LlavaDetection/ollama_server
159159
deploy:
160160
mode: global
161-
resources:
162-
reservations:
163-
devices:
164-
- driver: nvidia
165-
# Ollama can run with a GPU, but to use CPU mode we need to blank out the
166-
# device ids; otherwise the server will see all of the GPUs on this host
167-
# and not use CPU mode.
168-
device_ids: ['']
169-
capabilities: [gpu]
170161
ulimits:
171162
memlock: -1
172163
stack: 67108864
173164
environment:
165+
# Use "NVIDIA_VISIBLE_DEVICES=" (no value) for CPU mode.
166+
# CPU mode is very slow and not recommended.
167+
# To use a GPU, specify a GPU id.
168+
- NVIDIA_VISIBLE_DEVICES=
174169
- OLLAMA_KEEP_ALIVE=-1m
175170
# https://github.com/ollama/ollama/issues/5756#issuecomment-2239896500
176171
- OLLAMA_NUM_PARALLEL=1

0 commit comments

Comments
 (0)