File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ services:
13
13
{ {- $gpuListQuoted = printf " %s,'%v'" $gpuListQuoted $gpu } }
14
14
{ {- end } }
15
15
{ {- end } }
16
+ { {- $gpuListZeroIndexedSeq := seq 0 (sub $gpuByReplica 1) -} }
17
+ { {- $gpuListZeroIndexed := join $gpuListZeroIndexedSeq " ," -} }
16
18
ollama-service-{ { add $i 1 } }:
17
19
restart: always
18
20
image: ghcr.io/socialgouv/vllm-managed-instance/ollama/ollama:latest
@@ -29,6 +31,8 @@ services:
29
31
- "traefik.http.services.ollama-service.loadbalancer.server.port=11434"
30
32
environment:
31
33
OLLAMA_KEEP_ALIVE: "-1"
34
+ NVIDIA_VISIBLE_DEVICES: "{ { $gpuListZeroIndexed } }"
35
+ CUDA_VISIBLE_DEVICES: "{ { $gpuListZeroIndexed } }"
32
36
runtime: nvidia
33
37
ipc: host
34
38
deploy:
@@ -45,8 +49,6 @@ services:
45
49
- ollama-network
46
50
{ {- end } }
47
51
48
-
49
-
50
52
reverse-proxy:
51
53
image: ghcr.io/socialgouv/vllm-managed-instance/traefik:v3.2
52
54
command:
You can’t perform that action at this time.
0 commit comments