Skip to content

Commit 9af2917

Browse files
joostinyibolasim
andauthored
Fix SERVER_START_CMD environment variable (#320)
* Fix entrypoint for published servers * iterate * use subshell in entrypoint for env var resolution * fix dead doc link * Revert "fix dead doc link" This reverts commit 6475f3c. * fix entrypoint * fix test * add SERVER_START_CMD to dockerfile * fix diff test * bump dev12 * bump to 0.4.6 * fix dockerfile --------- Co-authored-by: Bola Malek <bola@baseten.co>
1 parent b85d253 commit 9af2917

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "truss"
3-
version = "0.4.6dev10"
3+
version = "0.4.6"
44
description = "A seamless bridge from model development to model delivery"
55
license = "MIT"
66
readme = "README.md"

truss/templates/server.Dockerfile.jinja

+3-1
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@ COPY ./{{config.data_dir}} /app/data
6464
ENV HASH_TRUSS {{truss_hash}}
6565
ENV CONTROL_SERVER_PORT 8080
6666
ENV INFERENCE_SERVER_PORT 8090
67+
ENV SERVER_START_CMD="/control/.env/bin/python3 /control/control/server.py"
6768
ENTRYPOINT ["/control/.env/bin/python3", "/control/control/server.py"]
6869
{%- else %}
6970
ENV INFERENCE_SERVER_PORT 8080
70-
ENTRYPOINT $PYTHON_EXECUTABLE /app/inference_server.py
71+
ENV SERVER_START_CMD="{{(config.base_image.python_executable_path or "python3") ~ " /app/inference_server.py"}}"
72+
ENTRYPOINT ["{{config.base_image.python_executable_path or "python3"}}", "/app/inference_server.py"]
7173
{%- endif %}
7274
{% endblock %}

truss/test_data/server.Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@ COPY ./data /app/data
4848
COPY ./packages /packages
4949

5050
ENV INFERENCE_SERVER_PORT 8080
51-
ENTRYPOINT $PYTHON_EXECUTABLE /app/inference_server.py
51+
ENV SERVER_START_CMD="/usr/local/bin/python3 /app/inference_server.py"
52+
ENTRYPOINT ["/usr/local/bin/python3", "/app/inference_server.py"]

0 commit comments

Comments
 (0)