-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* new compose file for production pod * development pod now uses images and same volume permissions * config for llama-cpp-python runtime added Signed-off-by: Jiri Podivin <[email protected]>
- Loading branch information
Showing
5 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
version: "3" | ||
services: | ||
llama-cpp: | ||
image: logdetective/runtime:latest-cuda | ||
build: | ||
context: . | ||
dockerfile: ./Containerfile.cuda | ||
hostname: "${LLAMA_CPP_HOST}" | ||
command: "python3 -m llama_cpp.server --model ${MODEL_FILEPATH} --host 0.0.0.0 --port ${LLAMA_CPP_SERVER_PORT} --n_gpu_layers ${LLM_NGPUS:-0}" | ||
stdin_open: true | ||
tty: true | ||
env_file: .env | ||
ports: | ||
- "${LLAMA_CPP_SERVER_PORT:-8000}:${LLAMA_CPP_SERVER_PORT:-8000}" | ||
volumes: | ||
- ${MODELS_PATH-./models}:/models:Z | ||
# these lines are needed for CUDA acceleration | ||
devices: | ||
- nvidia.com/gpu=all | ||
server: | ||
image: logdetective/runtime:latest | ||
build: | ||
context: . | ||
dockerfile: ./Containerfile | ||
hostname: logdetective-server | ||
stdin_open: true | ||
tty: true | ||
volumes: | ||
- .:/src/:Z | ||
ports: | ||
- "${LOGDETECTIVE_SERVER_PORT:-8080}:${LOGDETECTIVE_SERVER_PORT:-8080}" | ||
env_file: .env | ||
# --no-reload: doesn't work in a container - `PermissionError: Permission denied (os error 13) about ["/proc"]` | ||
command: fastapi run /src/logdetective/server.py --host 0.0.0.0 --port $LOGDETECTIVE_SERVER_PORT --no-reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"host": "0.0.0.0", | ||
"port": 8000, | ||
"models": [ | ||
{ | ||
"model": "models/mistral-7b-instruct-v0.2.Q4_K_S.gguf", | ||
"model_alias": "default-model", | ||
"chat_format": "mistral-instruct", | ||
"n_gpu_layers": -1, | ||
"offload_kqv": true, | ||
"n_threads": 12, | ||
"n_batch": 512, | ||
"n_ctx": 32768 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters