truss 0.11.5rc511__py3-none-any.whl → 0.11.5rc513__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.
@@ -77,17 +77,13 @@ class ModelContainerPatchApplier:
77
77
  def _truss_config(self) -> TrussConfig:
78
78
  return TrussConfig.from_yaml(self._inference_server_home / "config.yaml")
79
79
 
80
- def _derive_pip_from_inference_server_python(self, python_path: str) -> str:
81
- python_executable = Path(python_path)
82
- # Resolve symlinks to get the actual executable path
83
- python_executable = python_executable.resolve()
84
- pip_candidate = python_executable.parent / "pip"
85
- if pip_candidate.exists():
86
- return str(pip_candidate)
87
- raise RuntimeError(f"Unable to find pip for Python executable: {python_path}")
80
+ def _derive_pip_from_inference_server_python(self, python_path: str) -> tuple[str, list[str]]:
81
+ """Return (uv_executable, base_args) for package management using uv."""
82
+ # Use uv from PATH - it should be available since it's installed in the Dockerfile
83
+ return "uv", ["run", "--python", python_path, "pip", "install"]
88
84
 
89
85
  @property
90
- def _pip_path(self) -> str:
86
+ def _uv_executable_and_args(self) -> tuple[str, list[str]]:
91
87
  if self._pip_path_cached is None:
92
88
  self._pip_path_cached = self._derive_pip_from_inference_server_python(self._inference_server_python)
93
89
  return self._pip_path_cached
@@ -100,10 +96,11 @@ class ModelContainerPatchApplier:
100
96
  )
101
97
  action = python_requirement_patch.action
102
98
 
99
+ uv_executable, base_args = self._uv_executable_and_args
100
+
103
101
  if action == Action.REMOVE:
104
102
  subprocess.run(
105
- [
106
- self._pip_path,
103
+ [uv_executable] + base_args + [
107
104
  "uninstall",
108
105
  "-y",
109
106
  python_requirement_patch.requirement,
@@ -112,8 +109,7 @@ class ModelContainerPatchApplier:
112
109
  )
113
110
  elif action in [Action.ADD, Action.UPDATE]:
114
111
  subprocess.run(
115
- [
116
- self._pip_path,
112
+ [uv_executable] + base_args + [
117
113
  "install",
118
114
  python_requirement_patch.requirement,
119
115
  "--upgrade",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: truss
3
- Version: 0.11.5rc511
3
+ Version: 0.11.5rc513
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
@@ -84,7 +84,7 @@ truss/templates/control/control/helpers/inference_server_process_controller.py,s
84
84
  truss/templates/control/control/helpers/inference_server_starter.py,sha256=Fz2Puijro6Cc5cvTsAqOveNJbBQR_ARYJXl4lvETJ8Y,2633
85
85
  truss/templates/control/control/helpers/truss_patch/__init__.py,sha256=CXZdUV_ylqLTJrKuFpvSnUT6PUFrZrMF2y6jiHbdaKU,998
86
86
  truss/templates/control/control/helpers/truss_patch/model_code_patch_applier.py,sha256=LTIIADLz0wRn7V49j64dU1U7Hbta9YLde3pb5YZWvzQ,2001
87
- truss/templates/control/control/helpers/truss_patch/model_container_patch_applier.py,sha256=Np3-kLXnh2rgXk1Nfwim11DWTkUjZ7gcrtA-icYQqMk,6722
87
+ truss/templates/control/control/helpers/truss_patch/model_container_patch_applier.py,sha256=lpV-5ObmEldiBbCSdQJesJYjg9zOxfMRrrh9349WCFA,6689
88
88
  truss/templates/control/control/helpers/truss_patch/requirement_name_identifier.py,sha256=CL3KEAj4B3ApMQShd7TI5umXVbazLZY5StrNlwHwWtc,1995
89
89
  truss/templates/control/control/helpers/truss_patch/system_packages.py,sha256=IYh1CVU_kooAvtSGXKQDDWnNdOhlv7ENWagsL1wvhgw,208
90
90
  truss/templates/custom/examples.yaml,sha256=2UcCtEdavImWmiCtj31ckBlAKVOwNMC5AwMIIznKDag,48
@@ -368,8 +368,8 @@ truss_train/deployment.py,sha256=lWWANSuzBWu2M4oK4qD7n-oVR1JKdmw2Pn5BJQHg-Ck,307
368
368
  truss_train/loader.py,sha256=0o66EjBaHc2YY4syxxHVR4ordJWs13lNXnKjKq2wq0U,1630
369
369
  truss_train/public_api.py,sha256=9N_NstiUlmBuLUwH_fNG_1x7OhGCytZLNvqKXBlStrM,1220
370
370
  truss_train/restore_from_checkpoint.py,sha256=8hdPm-WSgkt74HDPjvCjZMBpvA9MwtoYsxVjOoa7BaM,1176
371
- truss-0.11.5rc511.dist-info/METADATA,sha256=SHv0KiJnhaojxWyuHKA5xYIj4La8QNvNMo06taE90-c,6682
372
- truss-0.11.5rc511.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
373
- truss-0.11.5rc511.dist-info/entry_points.txt,sha256=-MwKfHHQHQ6j0HqIgvxrz3CehCmczDLTD-OsRHnjjuU,130
374
- truss-0.11.5rc511.dist-info/licenses/LICENSE,sha256=FTqGzu85i-uw1Gi8E_o0oD60bH9yQ_XIGtZbA1QUYiw,1064
375
- truss-0.11.5rc511.dist-info/RECORD,,
371
+ truss-0.11.5rc513.dist-info/METADATA,sha256=JURDJJqbumK_xeo4DgWmIvwgtgsgx1spIZZJ29iBPmE,6682
372
+ truss-0.11.5rc513.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
373
+ truss-0.11.5rc513.dist-info/entry_points.txt,sha256=-MwKfHHQHQ6j0HqIgvxrz3CehCmczDLTD-OsRHnjjuU,130
374
+ truss-0.11.5rc513.dist-info/licenses/LICENSE,sha256=FTqGzu85i-uw1Gi8E_o0oD60bH9yQ_XIGtZbA1QUYiw,1064
375
+ truss-0.11.5rc513.dist-info/RECORD,,