Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianshu Cheng authored and Tianshu Cheng committed Oct 15, 2024
1 parent 1f6f98b commit 53bbfb7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions truss/templates/base.Dockerfile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ RUN pip install -r {{config_requirements_filename}} --no-cache-dir && rm -rf /ro



{%- if not config.docker_server %}
ENV APP_HOME="/app"
WORKDIR $APP_HOME
{%- endif %}

{% block app_copy %}
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion truss/test_data/test_custom_server_truss/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ model_name: Test Docker Server Truss
secrets:
hf_access_token: null
environment_variables:
HF_TOKEN: 123456
HF_TOKEN: 123
runtime:
predict_concurrency: 1
5 changes: 4 additions & 1 deletion truss/tests/test_trussless_custom_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ def test_custom_server_truss():

tr = TrussHandle(truss_dir)
LocalConfigHandler.set_secret("hf_access_token", "123")
_ = tr.docker_run(local_port=8090, detach=True, wait_for_server_ready=True, model_server_stop_retry_criteria=stop_after_delay(3))
try:
_ = tr.docker_run(local_port=8090, detach=True, wait_for_server_ready=True, model_server_stop_retry_criteria=stop_after_delay(3))
except Exception as e:
raise Exception(f"Failed to start container: {e}")
truss_server_addr = "http://localhost:8090"
full_url = f"{truss_server_addr}/v1/models/model:predict"

Expand Down

0 comments on commit 53bbfb7

Please sign in to comment.