| @@ -0,0 +1,32 @@ | |||
| 1 | + | version: "3.9" | |
| 2 | + | ||
| 3 | + | services: | |
| 4 | + | ollama: | |
| 5 | + | image: ollama/ollama:latest | |
| 6 | + | container_name: ollama | |
| 7 | + | deploy: | |
| 8 | + | resources: | |
| 9 | + | reservations: | |
| 10 | + | devices: | |
| 11 | + | - capabilities: [gpu] | |
| 12 | + | environment: | |
| 13 | + | - OLLAMA_VULKAN=false | |
| 14 | + | - NVIDIA_VISIBLE_DEVICES=all | |
| 15 | + | - NVIDIA_DRIVER_CAPABILITIES=compute,utility | |
| 16 | + | volumes: | |
| 17 | + | - ollama:/root/.ollama | |
| 18 | + | ports: | |
| 19 | + | - "11434:11434" | |
| 20 | + | restart: unless-stopped | |
| 21 | + | entrypoint: > | |
| 22 | + | sh -c " | |
| 23 | + | ollama serve & | |
| 24 | + | sleep 3 && | |
| 25 | + | ollama pull llama3:latest && | |
| 26 | + | ollama pull mistral:latest && | |
| 27 | + | ollama pull phi3:mini && | |
| 28 | + | wait | |
| 29 | + | " | |
| 30 | + | ||
| 31 | + | volumes: | |
| 32 | + | ollama: | |
admin revised this gist 1 month ago · 1b0b336
1 file changed, 32 insertions