Skip to content

Commit 1d55b4a

Browse files
author
sd109
committed
Allow setting HF model in Tiltfile
1 parent 2530b15 commit 1d55b4a

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

Tiltfile

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# The HuggingFace model to use for testing
2+
# hf_model = "ise-uiuc/Magicoder-S-DS-6.7B"
3+
hf_model = "TheBloke/WizardCoder-Python-34B-V1.0-AWQ"
4+
15
# Toggles whether UI should be run locally using gradio hot-reloading
26
# or should be included in the remote Helm install
37
run_ui_locally = True
@@ -13,7 +17,10 @@ chart_yaml = helm(
1317
"chart/",
1418
values="hu-dev-values.yml",
1519
# Enable/disable remote UI install depending on if we're running it locally
16-
set="ui.enabled={}".format(not str(run_ui_locally).lower()),
20+
set=[
21+
"huggingface.model={}".format(hf_model),
22+
"ui.enabled={}".format(not str(run_ui_locally).lower())
23+
],
1724
)
1825
k8s_yaml(chart_yaml)
1926

@@ -32,10 +39,10 @@ if run_ui_locally:
3239
local_resource(
3340
name="gradio-app-venv",
3441
deps=[requirements],
35-
cmd="".join([
42+
cmd=" && ".join([
3643
"([[ -d {} ]] || python3 -m venv {})".format(venv_name, venv_name),
37-
"&& source {}/bin/activate".format(venv_name),
38-
"&& pip install -r {}".format(requirements),
44+
"source {}/bin/activate".format(venv_name),
45+
"pip install -r {}".format(requirements),
3946
])
4047
)
4148

@@ -44,8 +51,8 @@ if run_ui_locally:
4451
name="gradio-app",
4552
deps=["chart/web-app/"],
4653
resource_deps=["gradio-app-venv"],
47-
serve_cmd="".join([
54+
serve_cmd=" && ".join([
4855
"cd chart/web-app",
49-
"&& python app.py",
56+
"python app.py {}".format(hf_model),
5057
])
5158
)

0 commit comments

Comments
 (0)