feat: add ollama & PostgresSQL & Qdrant & RabbitMQ

This commit is contained in:
Sun-ZhenXing
2025-09-21 20:54:17 +08:00
parent 166f0f2a50
commit b250573e72
11 changed files with 205 additions and 1 deletions

19
src/ollama/README.md Normal file
View File

@@ -0,0 +1,19 @@
# Ollama
拉取 DeepSeek R1 7B 模型:
```bash
docker exec -it ollama ollama pull deepseek-r1:7b
```
列出本地所有模型:
```bash
docker exec -it ollama ollama list
```
API 请求获取本地所有模型:
```bash
curl http://localhost:11434/api/tags 2> /dev/null | jq
```

View File

@@ -0,0 +1,35 @@
x-default: &default
restart: unless-stopped
volumes:
- &localtime /etc/localtime:/etc/localtime:ro
- &timezone /etc/timezone:/etc/timezone:ro
logging:
driver: json-file
options:
max-size: 100m
services:
ollama:
<<: *default
image: ollama/ollama:${OLLAMA_VERSION:-0.12.0}
ports:
- "${OLLAMA_PORT:-11434}:11434"
volumes:
- *localtime
- *timezone
- ollama_models:/root/.ollama
deploy:
resources:
limits:
cpus: '8.0'
memory: 4G
reservations:
cpus: '2.0'
memory: 2G
devices:
- driver: nvidia
device_ids: [ '0' ]
capabilities: [ gpu ]
volumes:
ollama_models: