truss 0.11.13rc500__py3-none-any.whl → 0.11.14__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/constants.py CHANGED
@@ -49,6 +49,7 @@ FILENAME_CONSTANTS_MAP = {
49
49
  }
50
50
 
51
51
  SERVER_DOCKERFILE_TEMPLATE_NAME = "server.Dockerfile.jinja"
52
+ NO_BUILD_DOCKERFILE_TEMPLATE_NAME = "no_build.Dockerfile.jinja"
52
53
  MODEL_DOCKERFILE_NAME = "Dockerfile"
53
54
  MODEL_CACHE_PATH = pathlib.Path("/app/model_cache")
54
55
  README_TEMPLATE_NAME = "README.md.jinja"
@@ -541,11 +541,19 @@ class BaseImage(custom_types.ConfigModel):
541
541
 
542
542
 
543
543
  class DockerServer(custom_types.ConfigModel):
544
- start_command: str
544
+ start_command: Optional[str] = None
545
545
  server_port: int
546
546
  predict_endpoint: str
547
547
  readiness_endpoint: str
548
548
  liveness_endpoint: str
549
+ run_as_user_id: Optional[int] = None
550
+ no_build: Optional[bool] = None
551
+
552
+ @pydantic.model_validator(mode="after")
553
+ def _validate_start_command(self) -> "DockerServer":
554
+ if not self.no_build and self.start_command is None:
555
+ raise ValueError("start_command is required when no_build is not true")
556
+ return self
549
557
 
550
558
 
551
559
  class TrainingArtifactReference(custom_types.ConfigModel):
@@ -32,6 +32,7 @@ from truss.base.constants import (
32
32
  FILENAME_CONSTANTS_MAP,
33
33
  MODEL_CACHE_PATH,
34
34
  MODEL_DOCKERFILE_NAME,
35
+ NO_BUILD_DOCKERFILE_TEMPLATE_NAME,
35
36
  REQUIREMENTS_TXT_FILENAME,
36
37
  SERVER_CODE_DIR,
37
38
  SERVER_DOCKERFILE_TEMPLATE_NAME,
@@ -577,7 +578,10 @@ class ServingImageBuilder(ImageBuilder):
577
578
  else:
578
579
  self.prepare_trtllm_decoder_build_dir(build_dir=build_dir)
579
580
 
580
- if config.docker_server is not None:
581
+ if (
582
+ config.docker_server is not None
583
+ and config.docker_server.no_build is not True
584
+ ):
581
585
  self._copy_into_build_dir(
582
586
  TEMPLATES_DIR / "docker_server_requirements.txt",
583
587
  build_dir,
@@ -750,12 +754,21 @@ class ServingImageBuilder(ImageBuilder):
750
754
  build_commands: List[str],
751
755
  ):
752
756
  config = self._spec.config
757
+
753
758
  data_dir = build_dir / config.data_dir
754
759
  model_dir = build_dir / config.model_module_dir
755
760
  bundled_packages_dir = build_dir / config.bundled_packages_dir
756
- dockerfile_template = read_template_from_fs(
757
- TEMPLATES_DIR, SERVER_DOCKERFILE_TEMPLATE_NAME
758
- )
761
+
762
+ # Note: no-build deployment template doesn't use most of the template variables,
763
+ # because it tries to run the base image as-is to the extent possible.
764
+ if config.docker_server and config.docker_server.no_build:
765
+ dockerfile_template = read_template_from_fs(
766
+ TEMPLATES_DIR, NO_BUILD_DOCKERFILE_TEMPLATE_NAME
767
+ )
768
+ else:
769
+ dockerfile_template = read_template_from_fs(
770
+ TEMPLATES_DIR, SERVER_DOCKERFILE_TEMPLATE_NAME
771
+ )
759
772
  python_version = truss_config.to_dotted_python_version(config.python_version)
760
773
  if config.base_image:
761
774
  base_image_name_and_tag = config.base_image.image
@@ -0,0 +1 @@
1
+ FROM {{ config.base_image.image }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: truss
3
- Version: 0.11.13rc500
3
+ Version: 0.11.14
4
4
  Summary: A seamless bridge from model development to model delivery
5
5
  Project-URL: Repository, https://github.com/basetenlabs/truss
6
6
  Project-URL: Homepage, https://truss.baseten.co
@@ -2,11 +2,11 @@ truss/__init__.py,sha256=CoUcP6vx_pocyemRmpbCPlndkHhdMkABAlr0ZXVuPCk,1163
2
2
  truss/api/__init__.py,sha256=5GTE2rlupet-beaawUr0FPyDPEJ9UyBTUpJmCE3RGfc,5453
3
3
  truss/api/definitions.py,sha256=QAaIBqL59Q-R7HtLcXcoeCIWBN2HqOzApdFX0PpCq2s,1604
4
4
  truss/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- truss/base/constants.py,sha256=sExArdnuGg83z83XMgaQ4b8SS3V_j_bJEpOATDGJzpE,3600
5
+ truss/base/constants.py,sha256=yFvDVyWMqeAsWOfKUKJVUNbH26N2JZKDqgxmRSe4EWk,3664
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=rEtBVFg2QnNMxnaz11s5Z69dJB1w7Bpt48Wf6jSsVZI,33087
9
- truss/base/truss_config.py,sha256=7CtiJIwMHtDU8Wzn8UTJUVVunD0pWFl4QUVycK2aIpY,28055
9
+ truss/base/truss_config.py,sha256=s39Xc1e20s8IV07YLl_aVnp-uRS18ZQ2TV-3FILx4nY,28416
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=n6MTHMZsANSTGXPfkKDJ1Ch4fEc6HIjbOXA_1B9zt9Q,33438
39
+ truss/contexts/image_builder/serving_image_builder.py,sha256=1PfHtkTEdNPhSQAX8Ajk_0LN3KR2EfLKwOJsnECtKXQ,33958
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
@@ -71,6 +71,7 @@ truss/templates/cache.Dockerfile.jinja,sha256=1qZqDo1phrcqi-Vwol-VafYJkADsBbQWU6
71
71
  truss/templates/cache_requirements.txt,sha256=xoPoJ-OVnf1z6oq_RVM3vCr3ionByyqMLj7wGs61nUs,87
72
72
  truss/templates/copy_cache_files.Dockerfile.jinja,sha256=Os5zFdYLZ_AfCRGq4RcpVTObOTwL7zvmwYcvOzd_Zqo,126
73
73
  truss/templates/docker_server_requirements.txt,sha256=PyhOPKAmKW1N2vLvTfLMwsEtuGpoRrbWuNo7tT6v2Mc,18
74
+ truss/templates/no_build.Dockerfile.jinja,sha256=8x2PJUxr_gHai0St8ue2aWyih36t8kBytXMGr_5LG4w,35
74
75
  truss/templates/server.Dockerfile.jinja,sha256=Mu5_ZxuAknwaEOsF0l-XssA9pDg3pD3eLl6JBzNJ4rg,7091
75
76
  truss/templates/control/requirements.txt,sha256=tJGr83WoE0CZm2FrloZ9VScK84q-_FTuVXjDYrexhW0,250
76
77
  truss/templates/control/control/application.py,sha256=5Kam6M-XtfKGaXQz8cc3d0bwDkB80o2MskABWROx1gk,5321
@@ -370,8 +371,8 @@ truss_train/deployment.py,sha256=lWWANSuzBWu2M4oK4qD7n-oVR1JKdmw2Pn5BJQHg-Ck,307
370
371
  truss_train/loader.py,sha256=0o66EjBaHc2YY4syxxHVR4ordJWs13lNXnKjKq2wq0U,1630
371
372
  truss_train/public_api.py,sha256=9N_NstiUlmBuLUwH_fNG_1x7OhGCytZLNvqKXBlStrM,1220
372
373
  truss_train/restore_from_checkpoint.py,sha256=8hdPm-WSgkt74HDPjvCjZMBpvA9MwtoYsxVjOoa7BaM,1176
373
- truss-0.11.13rc500.dist-info/METADATA,sha256=fO90Qd0TBo1ZirChnji7aZh2vHpqYmuUGsCYMZGe4Oo,6683
374
- truss-0.11.13rc500.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
375
- truss-0.11.13rc500.dist-info/entry_points.txt,sha256=-MwKfHHQHQ6j0HqIgvxrz3CehCmczDLTD-OsRHnjjuU,130
376
- truss-0.11.13rc500.dist-info/licenses/LICENSE,sha256=FTqGzu85i-uw1Gi8E_o0oD60bH9yQ_XIGtZbA1QUYiw,1064
377
- truss-0.11.13rc500.dist-info/RECORD,,
374
+ truss-0.11.14.dist-info/METADATA,sha256=3F8SLMvpqzqYhOb4WB0Ngy_eFRBS_AJqhHtfy4j73DQ,6678
375
+ truss-0.11.14.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
376
+ truss-0.11.14.dist-info/entry_points.txt,sha256=-MwKfHHQHQ6j0HqIgvxrz3CehCmczDLTD-OsRHnjjuU,130
377
+ truss-0.11.14.dist-info/licenses/LICENSE,sha256=FTqGzu85i-uw1Gi8E_o0oD60bH9yQ_XIGtZbA1QUYiw,1064
378
+ truss-0.11.14.dist-info/RECORD,,