mirror of
https://github.com/runyanjake/olomana.git
synced 2026-11-10 13:54:52 -08:00
Add .env, update readme
This commit is contained in:
parent
b81d247ab4
commit
7f38fa2aed
10
ai/llama_cpp/.env.example
Normal file
10
ai/llama_cpp/.env.example
Normal file
@ -0,0 +1,10 @@
|
||||
# Host directory path where GGUF models are stored
|
||||
MODELS_PATH=/pwspool/software/ai/llama_cpp
|
||||
|
||||
# Filename of the default model to load
|
||||
MODEL_FILE=Llama-3.1-8B-Instruct-Q4_K_M.gguf
|
||||
|
||||
# Performance and hardware tuning
|
||||
GPU_LAYERS=999
|
||||
CTX_SIZE=4096
|
||||
THREADS=6
|
||||
1
ai/llama_cpp/.gitignore
vendored
Normal file
1
ai/llama_cpp/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.env
|
||||
@ -3,3 +3,16 @@ A general purpose llm server that projects can connect to.
|
||||
|
||||
## Network
|
||||
Create the `ai` docker network, applications can access the OpenAI spec server through `http://llm-server:8080/v1`.
|
||||
|
||||
## Setup
|
||||
1. Start service
|
||||
|
||||
```bash
|
||||
docker compose up
|
||||
```
|
||||
|
||||
2. Download model(s)
|
||||
```bash
|
||||
cd /pwspool/software/ai/llama_cpp
|
||||
sudo wget https://huggingface.co/bartowski/Meta-Llama-3.1-8B-Instruct-GGUF/resolve/main/Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf -O Llama-3.1-8B-Instruct-Q4_K_M.gguf
|
||||
```
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
networks:
|
||||
ai:
|
||||
name: ai
|
||||
driver: bridge
|
||||
|
||||
services:
|
||||
@ -10,14 +11,14 @@ services:
|
||||
networks:
|
||||
- ai
|
||||
volumes:
|
||||
- /pwspool/software/ai/llama_cpp:/models
|
||||
command: >
|
||||
-m /models/Llama-3.1-8B-Instruct-Q4_K_M.gguf
|
||||
--host 0.0.0.0
|
||||
--port 8080
|
||||
-ngl 999
|
||||
-c 4096
|
||||
--threads 6
|
||||
- ${MODELS_PATH:-/pwspool/software/ai/llama_cpp}:/models
|
||||
environment:
|
||||
- LLAMA_ARG_MODEL=/models/${MODEL_FILE:-Llama-3.1-8B-Instruct-Q4_K_M.gguf}
|
||||
- LLAMA_ARG_HOST=0.0.0.0
|
||||
- LLAMA_ARG_PORT=8080
|
||||
- LLAMA_ARG_N_GPU_LAYERS=${GPU_LAYERS:-999}
|
||||
- LLAMA_ARG_CTX_SIZE=${CTX_SIZE:-4096}
|
||||
- LLAMA_ARG_THREADS=${THREADS:-6}
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user