Cleanup environment variable (#30)

* Remove EVENTS_LOG_DIR

* Rename supervisord.sh -> tabby.sh
add-more-languages
Meng Zhang 2023-03-29 16:33:00 +08:00 committed by GitHub
parent 44ac6cd510
commit 20801bbe8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 10 deletions

View File

@ -42,7 +42,7 @@ COPY deployment/config/vector.toml /etc/vector/vector.toml
# Supervisord
RUN --mount=type=cache,target=/root/.cache pip install -i $PYPI_INDEX_URL --extra-index-url https://pypi.org/simple supervisor
COPY deployment/scripts/supervisord.sh /usr/bin
COPY tabby ./tabby
CMD ["supervisord.sh"]
COPY deployment/scripts/tabby.sh /usr/bin
CMD ["tabby.sh"]

View File

@ -34,6 +34,7 @@ docker run \
-v ./data/hf_cache:/root/.cache/huggingface \
-p 5000:5000 \
-p 8501:8501 \
-p 8080:8080\
-e MODEL_NAME=TabbyML/J-350M tabbyml/tabby
```

View File

@ -7,7 +7,7 @@ services:
environment:
MODEL_NAME: ${MODEL_NAME}
MODEL_BACKEND: triton
EVENTS_LOG_DIR: /data/logs/tabby-server
LOGS_DIR: /data/logs
DAGU_DAGS: /app/tabby/tasks
ports:
- "5000:5000"
@ -25,10 +25,10 @@ services:
triton:
image: tabbyml/fastertransformer_backend
container_name: tabby-triton
command: /scripts/triton.sh
command: triton.sh
shm_size: 1gb
volumes:
- ./scripts:/scripts
- ./scripts/triton.sh:/usr/bin/triton.sh:ro
- ${HF_VOLUME}
deploy:
resources:

View File

@ -8,7 +8,6 @@ export DB_FILE="${DB_FILE:-/data/logs/duckdb/duck.db}"
# server
export MODEL_NAME="${MODEL_NAME:-TabbyML/J-350M}"
export MODEL_BACKEND="${MODEL_BACKEND:-python}"
export EVENTS_LOG_DIR="${LOGS_DIR}/tabby-server"
# dagu
export DAGU_DAGS="tabby/tasks"

View File

@ -13,4 +13,4 @@ services:
volumes:
- ../:/app
- ../deployment/config/vector.toml:/etc/vector/vector.toml:ro
- ../deployment/scripts/supervisord.sh:/usr/bin/supervisord.sh:ro
- ../deployment/scripts/tabby.sh:/usr/bin/tabby.sh:ro

View File

@ -27,9 +27,9 @@ def setup_logging(logdir):
)
EVENTS_LOG_DIR = os.environ.get("EVENTS_LOG_DIR", None)
if EVENTS_LOG_DIR is not None:
setup_logging(EVENTS_LOG_DIR)
LOGS_DIR = os.environ.get("LOGS_DIR", None)
if LOGS_DIR is not None:
setup_logging(os.path.join(LOGS_DIR, "tabby-server"))
def log_completions(