-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.ollama.yml
43 lines (39 loc) · 1.3 KB
/
docker-compose.ollama.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
version: '3'
services:
ollama:
container_name: ollama
image: ollama/ollama
volumes:
- ./docker/ollama:/ollama # Mount the directory containing entrypoint.sh
ports:
- 11434:11434
entrypoint: ["/ollama/entrypoint.sh"] # Specify the entrypoint script
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
############################################################
## Pull Model
############################################################
# curl -X POST http://localhost:11434/api/pull -d '{
# "name": "llama2:7b"
# }'
############################################################
## Get Model
############################################################
# curl http://localhost:11434/api/tags
############################################################
## Vector Embeddings
############################################################
# curl -X POST http://localhost:11434/api/embeddings -d '{
# "model": "llama2:7b",
# "prompt": "Here is an article about llamas..."
# }'
############################################################
## Query the model
############################################################
# curl -X POST http://localhost:11434/api/generate -d '{
# "model": "llama2",
# "prompt":"Why is the sky blue?"
# }'