Skip to content

Commit

Permalink
app.toml updates (#871)
Browse files Browse the repository at this point in the history
* app.toml updates

* _is_true

* _is_true expects str
  • Loading branch information
pascal-pfeiffer authored Sep 26, 2024
1 parent b230c77 commit 2e9b735
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions app.toml.template
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ CPUReservation = "10"
MemoryReservation = "118Gi"
MemoryLimit = "118Gi"
GPUCount = 1
GPUType = "training-gpu"
VolumeMount = "/home/llmstudio/mount"
VolumeSize = "1Ti"
ResourceVolumeSize = "1Ti"
EnableSHM = true
EnableOIDC = true
RoutingMode = "BASE_URL"
CustomImage = "docker.io/h2oairelease/h2oai-llmstudio-app:v{{VERSION}}"

[[Env]]
Name = "H2O_LLM_STUDIO_WORKDIR"
Expand All @@ -39,3 +37,7 @@ Value = "True"
[[Env]]
Name = "H2O_WAVE_PRIVATE_DIR"
Value = "/download/@/home/llmstudio/mount/output/download"

[[Env]]
Name = "HF_HUB_ENABLE_HF_TRANSFER"
Value = "0"
5 changes: 3 additions & 2 deletions llm_studio/app_utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from types import SimpleNamespace

import toml
from huggingface_hub.constants import _is_true

toml_root_dir = os.path.abspath(
os.path.join(os.path.dirname(os.path.abspath(__file__)), "../..")
Expand Down Expand Up @@ -160,8 +161,8 @@ def get_size(x):
"default_wandb_project": os.getenv("WANDB_PROJECT", ""),
"default_wandb_entity": os.getenv("WANDB_ENTITY", ""),
"default_huggingface_api_token": os.getenv("HF_TOKEN", ""),
"default_hf_hub_enable_hf_transfer": os.getenv(
"HF_HUB_ENABLE_HF_TRANSFER", True
"default_hf_hub_enable_hf_transfer": _is_true(
os.getenv("HF_HUB_ENABLE_HF_TRANSFER", "1")
),
"default_openai_azure": os.getenv("OPENAI_API_TYPE", "open_ai") == "azure",
"default_openai_api_token": os.getenv("OPENAI_API_KEY", ""),
Expand Down

0 comments on commit 2e9b735

Please sign in to comment.