truss 0.11.12rc508__py3-none-any.whl → 0.11.12rc509__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of truss might be problematic. Click here for more details.
- truss/base/truss_config.py +1 -3
- truss/contexts/image_builder/serving_image_builder.py +8 -0
- truss/templates/shared/lazy_data_resolver.py +5 -0
- {truss-0.11.12rc508.dist-info → truss-0.11.12rc509.dist-info}/METADATA +1 -1
- {truss-0.11.12rc508.dist-info → truss-0.11.12rc509.dist-info}/RECORD +8 -8
- {truss-0.11.12rc508.dist-info → truss-0.11.12rc509.dist-info}/WHEEL +0 -0
- {truss-0.11.12rc508.dist-info → truss-0.11.12rc509.dist-info}/entry_points.txt +0 -0
- {truss-0.11.12rc508.dist-info → truss-0.11.12rc509.dist-info}/licenses/LICENSE +0 -0
truss/base/truss_config.py
CHANGED
|
@@ -552,9 +552,7 @@ class DockerServer(custom_types.ConfigModel):
|
|
|
552
552
|
@pydantic.model_validator(mode="after")
|
|
553
553
|
def _validate_start_command(self) -> "DockerServer":
|
|
554
554
|
if not self.as_is and self.start_command is None:
|
|
555
|
-
raise ValueError(
|
|
556
|
-
"start_command is required when as_is is not true"
|
|
557
|
-
)
|
|
555
|
+
raise ValueError("start_command is required when as_is is not true")
|
|
558
556
|
return self
|
|
559
557
|
|
|
560
558
|
|
|
@@ -754,6 +754,14 @@ class ServingImageBuilder(ImageBuilder):
|
|
|
754
754
|
# Escape hatch for as-is deployments
|
|
755
755
|
if ff_as_is and config.docker_server and config.docker_server.as_is:
|
|
756
756
|
dockerfile_contents = f"FROM {config.base_image.image}"
|
|
757
|
+
# Add COPY for bptr-manifest if model_cache v2 is enabled
|
|
758
|
+
if config.model_cache and config.model_cache.is_v2:
|
|
759
|
+
if config.docker_server and config.docker_server.run_as_user_id:
|
|
760
|
+
user_id = config.docker_server.run_as_user_id
|
|
761
|
+
else:
|
|
762
|
+
user_id = 60000
|
|
763
|
+
# dockerfile_contents += f"\nENV APP_HOME=$HOME"
|
|
764
|
+
dockerfile_contents += f"\nCOPY --chown={user_id}:{user_id} ./bptr-manifest $HOME/bptr-manifest"
|
|
757
765
|
docker_file_path = build_dir / MODEL_DOCKERFILE_NAME
|
|
758
766
|
docker_file_path.write_text(dockerfile_contents)
|
|
759
767
|
return
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import atexit
|
|
2
2
|
import logging
|
|
3
|
+
import os
|
|
3
4
|
import time
|
|
4
5
|
from functools import lru_cache
|
|
5
6
|
from pathlib import Path
|
|
@@ -13,6 +14,10 @@ LAZY_DATA_RESOLVER_PATH = [
|
|
|
13
14
|
Path("/static-bptr/static-bptr-manifest.json"),
|
|
14
15
|
]
|
|
15
16
|
|
|
17
|
+
# Add fallback for as-is deployments if HOME is set
|
|
18
|
+
if os.environ.get("HOME"):
|
|
19
|
+
LAZY_DATA_RESOLVER_PATH.append(Path(os.environ.get("HOME")) / "bptr-manifest")
|
|
20
|
+
|
|
16
21
|
MISSING_COLLECTION_MESSAGE = """model_cache: Data was not collected. Missing lazy_data_resolver.block_until_download_complete().
|
|
17
22
|
This is a potential bug by the user implementation of model.py when using model_cache.
|
|
18
23
|
We need you to call the block_until_download_complete() method during __init__ or load() method of your model.
|
|
@@ -6,7 +6,7 @@ truss/base/constants.py,sha256=sExArdnuGg83z83XMgaQ4b8SS3V_j_bJEpOATDGJzpE,3600
|
|
|
6
6
|
truss/base/custom_types.py,sha256=FUSIT2lPOQb6gfg6IzT63YBV8r8L6NIZ0D74Fp3e_jQ,2835
|
|
7
7
|
truss/base/errors.py,sha256=zDVLEvseTChdPP0oNhBBQCtQUtZJUaof5zeWMIjqz6o,691
|
|
8
8
|
truss/base/trt_llm_config.py,sha256=81ZZxRQF3o29HLCX6nlXtPwALejcdns6c4mbrExwASk,32958
|
|
9
|
-
truss/base/truss_config.py,sha256=
|
|
9
|
+
truss/base/truss_config.py,sha256=UW7WM-2KGGRsHTezoth29ty95oMcZIolO-sUxNI7YvM,28407
|
|
10
10
|
truss/base/truss_spec.py,sha256=jFVF79CXoEEspl2kXBAPyi-rwISReIGTdobGpaIhwJw,5979
|
|
11
11
|
truss/cli/chains_commands.py,sha256=Kpa5mCg6URAJQE2ZmZfVQFhjBHEitKT28tKiW0H6XAI,17406
|
|
12
12
|
truss/cli/cli.py,sha256=PaMkuwXZflkU7sa1tEoT_Zmy-iBkEZs1m4IVqcieaeo,30367
|
|
@@ -36,7 +36,7 @@ truss/contexts/docker_build_setup.py,sha256=cF4ExZgtYvrWxvyCAaUZUvV_DB_7__MqVomU
|
|
|
36
36
|
truss/contexts/truss_context.py,sha256=uS6L-ACHxNk0BsJwESOHh1lA0OGGw0pb33aFKGsASj4,436
|
|
37
37
|
truss/contexts/image_builder/cache_warmer.py,sha256=TGMV1Mh87n2e_dSowH0sf0rZhZraDOR-LVapZL3a5r8,7377
|
|
38
38
|
truss/contexts/image_builder/image_builder.py,sha256=IuRgDeeoHVLzIkJvKtX3807eeqEyaroCs_KWDcIHZUg,1461
|
|
39
|
-
truss/contexts/image_builder/serving_image_builder.py,sha256=
|
|
39
|
+
truss/contexts/image_builder/serving_image_builder.py,sha256=ZLaTnw3vFplhq2K1j62qswnHkNRUfj54-56mEua0XxI,34393
|
|
40
40
|
truss/contexts/image_builder/util.py,sha256=y2-CjUKv0XV-0w2sr1fUCflysDJLsoU4oPp6tvvoFnk,1203
|
|
41
41
|
truss/contexts/local_loader/docker_build_emulator.py,sha256=3n0eIlJblz_sldh4AN8AHQDyfjQGdYyld5FabBdd9wE,3563
|
|
42
42
|
truss/contexts/local_loader/dockerfile_parser.py,sha256=GoRJ0Af_3ILyLhjovK5lrCGn1rMxz6W3l681ro17ZzI,1344
|
|
@@ -107,7 +107,7 @@ truss/templates/server/common/tracing.py,sha256=XSTXNoRtV8vXwveJoX3H32go0JKnLmzn
|
|
|
107
107
|
truss/templates/server/common/patches/whisper/patch.py,sha256=kDECQ-wmEpeAZFhUTQP457ofueeMsm7DgNy9tqinhJQ,2383
|
|
108
108
|
truss/templates/shared/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
109
109
|
truss/templates/shared/dynamic_config_resolver.py,sha256=75s42NFhQI5jL7BqlJH_UkuQS7ptbtFh13f2nh6X5Wo,920
|
|
110
|
-
truss/templates/shared/lazy_data_resolver.py,sha256=
|
|
110
|
+
truss/templates/shared/lazy_data_resolver.py,sha256=pR0XVeb7GXWg1fhp5i-jVXja3z7ILOd49Fa43uLKbrU,6151
|
|
111
111
|
truss/templates/shared/log_config.py,sha256=l9udyu4VKHZePlfK9LQEd5TOUUodPuehypsXRSUL4Ac,5411
|
|
112
112
|
truss/templates/shared/secrets_resolver.py,sha256=3prDe3Q06NTmUEe7KCW-W4TD1CzGck9lpDG789209z4,2110
|
|
113
113
|
truss/templates/shared/serialization.py,sha256=_WC_2PPkRi-MdTwxwjG8LKQptnHi4sANfpOlKWevqWc,3736
|
|
@@ -370,8 +370,8 @@ truss_train/deployment.py,sha256=lWWANSuzBWu2M4oK4qD7n-oVR1JKdmw2Pn5BJQHg-Ck,307
|
|
|
370
370
|
truss_train/loader.py,sha256=0o66EjBaHc2YY4syxxHVR4ordJWs13lNXnKjKq2wq0U,1630
|
|
371
371
|
truss_train/public_api.py,sha256=9N_NstiUlmBuLUwH_fNG_1x7OhGCytZLNvqKXBlStrM,1220
|
|
372
372
|
truss_train/restore_from_checkpoint.py,sha256=8hdPm-WSgkt74HDPjvCjZMBpvA9MwtoYsxVjOoa7BaM,1176
|
|
373
|
-
truss-0.11.
|
|
374
|
-
truss-0.11.
|
|
375
|
-
truss-0.11.
|
|
376
|
-
truss-0.11.
|
|
377
|
-
truss-0.11.
|
|
373
|
+
truss-0.11.12rc509.dist-info/METADATA,sha256=Uot1ZaH-UabixhB4iRkgBxp3-7tWZLw6SedkgbxMKE8,6683
|
|
374
|
+
truss-0.11.12rc509.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
375
|
+
truss-0.11.12rc509.dist-info/entry_points.txt,sha256=-MwKfHHQHQ6j0HqIgvxrz3CehCmczDLTD-OsRHnjjuU,130
|
|
376
|
+
truss-0.11.12rc509.dist-info/licenses/LICENSE,sha256=FTqGzu85i-uw1Gi8E_o0oD60bH9yQ_XIGtZbA1QUYiw,1064
|
|
377
|
+
truss-0.11.12rc509.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|