Add vector logging for tabby-server events. (#25)
* Switch to dagu for init job * Add processed loggingadd-more-languages
parent
81baf7f3c6
commit
2f8714e6fe
|
|
@ -1,2 +1,6 @@
|
||||||
MODEL_NAME=TabbyML/J-350M
|
MODEL_NAME=TabbyML/J-350M
|
||||||
|
|
||||||
|
# Volumes
|
||||||
HF_VOLUME="../data/hf_cache:/root/.cache/huggingface"
|
HF_VOLUME="../data/hf_cache:/root/.cache/huggingface"
|
||||||
|
|
||||||
|
LOGS_VOLUME="../data/logs:/logs"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
[api]
|
||||||
|
enabled = true
|
||||||
|
address = "0.0.0.0:8686"
|
||||||
|
|
||||||
|
[sources.tabby_server_logs]
|
||||||
|
type = "file"
|
||||||
|
include = ["/logs/tabby-server/events.*.log"]
|
||||||
|
|
||||||
|
[transforms.process_tabby_server_logs]
|
||||||
|
type = "remap"
|
||||||
|
inputs = [ "tabby_server_logs" ]
|
||||||
|
source = ". = parse_json!(parse_json!(.message).record.message)"
|
||||||
|
|
||||||
|
[sinks.write_tabby_server_logs]
|
||||||
|
type = "file"
|
||||||
|
inputs = [ "process_tabby_server_logs" ]
|
||||||
|
encoding = { codec = "json" }
|
||||||
|
framing = { method = "newline_delimited" }
|
||||||
|
path = "/logs/tabby-server/events.%Y-%m-%d.json"
|
||||||
|
|
@ -4,7 +4,7 @@ services:
|
||||||
init:
|
init:
|
||||||
image: tabbyml/tabby
|
image: tabbyml/tabby
|
||||||
container_name: tabby-init
|
container_name: tabby-init
|
||||||
command: python -m tabby.tools.model_preload --repo_id ${MODEL_NAME}
|
command: dagu start --params=MODEL_NAME=${MODEL_NAME} ./tabby/tasks/init.yaml
|
||||||
volumes:
|
volumes:
|
||||||
- ${HF_VOLUME}
|
- ${HF_VOLUME}
|
||||||
|
|
||||||
|
|
@ -15,10 +15,12 @@ services:
|
||||||
environment:
|
environment:
|
||||||
MODEL_NAME: ${MODEL_NAME}
|
MODEL_NAME: ${MODEL_NAME}
|
||||||
MODEL_BACKEND: triton
|
MODEL_BACKEND: triton
|
||||||
|
EVENTS_LOG_DIR: /logs/tabby-server
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
volumes:
|
volumes:
|
||||||
- ${HF_VOLUME}
|
- ${HF_VOLUME}
|
||||||
|
- ${LOGS_VOLUME}
|
||||||
depends_on:
|
depends_on:
|
||||||
init:
|
init:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
|
|
@ -57,3 +59,10 @@ services:
|
||||||
interval: 2s
|
interval: 2s
|
||||||
timeout: 2s
|
timeout: 2s
|
||||||
start_period: 120s
|
start_period: 120s
|
||||||
|
|
||||||
|
vector:
|
||||||
|
image: timberio/vector:0.28.1-alpine
|
||||||
|
container_name: tabby-vector
|
||||||
|
volumes:
|
||||||
|
- ./config/vector.toml:/etc/vector/vector.toml:ro
|
||||||
|
- ${LOGS_VOLUME}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
params: MODEL_NAME
|
||||||
|
env:
|
||||||
|
- PATH: "/opt/conda/bin:$PATH"
|
||||||
|
- APP_DIR: /app
|
||||||
|
steps:
|
||||||
|
- name: Download models
|
||||||
|
dir: $APP_DIR
|
||||||
|
command: python -m tabby.tools.download_models --repo_id=$MODEL_NAME
|
||||||
Loading…
Reference in New Issue