modal 0.73.104__py3-none-any.whl → 0.73.105__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.
modal/client.pyi CHANGED
@@ -31,7 +31,7 @@ class _Client:
31
31
  server_url: str,
32
32
  client_type: int,
33
33
  credentials: typing.Optional[tuple[str, str]],
34
- version: str = "0.73.104",
34
+ version: str = "0.73.105",
35
35
  ): ...
36
36
  def is_closed(self) -> bool: ...
37
37
  @property
@@ -93,7 +93,7 @@ class Client:
93
93
  server_url: str,
94
94
  client_type: int,
95
95
  credentials: typing.Optional[tuple[str, str]],
96
- version: str = "0.73.104",
96
+ version: str = "0.73.105",
97
97
  ): ...
98
98
  def is_closed(self) -> bool: ...
99
99
  @property
modal/functions.pyi CHANGED
@@ -198,11 +198,11 @@ class Function(
198
198
 
199
199
  _call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
200
200
 
201
- class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
201
+ class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
202
202
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
203
203
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
204
204
 
205
- remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
205
+ remote: __remote_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
206
206
 
207
207
  class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
208
208
  def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
@@ -217,19 +217,19 @@ class Function(
217
217
  self, *args: modal._functions.P.args, **kwargs: modal._functions.P.kwargs
218
218
  ) -> modal._functions.OriginalReturnType: ...
219
219
 
220
- class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
220
+ class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
221
221
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
222
222
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
223
223
 
224
224
  _experimental_spawn: ___experimental_spawn_spec[
225
- modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
225
+ modal._functions.ReturnType, modal._functions.P, typing_extensions.Self
226
226
  ]
227
227
 
228
- class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
228
+ class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
229
229
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
230
230
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
231
231
 
232
- spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
232
+ spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
233
233
 
234
234
  def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
235
235
 
modal/image.py CHANGED
@@ -1444,6 +1444,9 @@ class _Image(_Object, type_prefix="im"):
1444
1444
  f"RUN micromamba install -n base -y python={validated_python_version} pip -c conda-forge",
1445
1445
  ]
1446
1446
  commands = _Image._registry_setup_commands(tag, version, setup_commands)
1447
+ if version > "2024.10":
1448
+ # for convenience when launching in a sandbox: sleep for 48h
1449
+ commands.append(f'CMD ["sleep", "{48 * 3600}"]')
1447
1450
  context_files = {CONTAINER_REQUIREMENTS_PATH: _get_modal_requirements_path(version, python_version)}
1448
1451
  return DockerfileSpec(commands=commands, context_files=context_files)
1449
1452
 
@@ -1833,6 +1836,9 @@ class _Image(_Object, type_prefix="im"):
1833
1836
  ]
1834
1837
  if version > "2023.12":
1835
1838
  commands.append(f"RUN rm {CONTAINER_REQUIREMENTS_PATH}")
1839
+ if version > "2024.10":
1840
+ # for convenience when launching in a sandbox: sleep for 48h
1841
+ commands.append(f'CMD ["sleep", "{48 * 3600}"]')
1836
1842
  return DockerfileSpec(commands=commands, context_files=context_files)
1837
1843
 
1838
1844
  return _Image._from_args(
@@ -2021,6 +2027,27 @@ class _Image(_Object, type_prefix="im"):
2021
2027
  dockerfile_function=build_dockerfile,
2022
2028
  )
2023
2029
 
2030
+ def cmd(self, cmd: list[str]) -> "_Image":
2031
+ """Set the default entrypoint argument (`CMD`) for the image.
2032
+
2033
+ **Example**
2034
+
2035
+ ```python
2036
+ image = (
2037
+ modal.Image.debian_slim().cmd(["python", "app.py"])
2038
+ )
2039
+ ```
2040
+ """
2041
+
2042
+ if not isinstance(cmd, list) or not all(isinstance(x, str) for x in cmd):
2043
+ raise InvalidError("Image CMD must be a list of strings.")
2044
+
2045
+ cmd_str = _flatten_str_args("cmd", "cmd", cmd)
2046
+ cmd_str = '"' + '", "'.join(cmd_str) + '"' if cmd_str else ""
2047
+ dockerfile_cmd = f"CMD [{cmd_str}]"
2048
+
2049
+ return self.dockerfile_commands(dockerfile_cmd)
2050
+
2024
2051
  # Live handle methods
2025
2052
 
2026
2053
  @contextlib.contextmanager
modal/image.pyi CHANGED
@@ -332,6 +332,7 @@ class _Image(modal._object._Object):
332
332
  ) -> _Image: ...
333
333
  def env(self, vars: dict[str, str]) -> _Image: ...
334
334
  def workdir(self, path: typing.Union[str, pathlib.PurePosixPath]) -> _Image: ...
335
+ def cmd(self, cmd: list[str]) -> _Image: ...
335
336
  def imports(self): ...
336
337
  def _logs(self) -> typing.AsyncGenerator[str, None]: ...
337
338
 
@@ -591,6 +592,7 @@ class Image(modal.object.Object):
591
592
  ) -> Image: ...
592
593
  def env(self, vars: dict[str, str]) -> Image: ...
593
594
  def workdir(self, path: typing.Union[str, pathlib.PurePosixPath]) -> Image: ...
595
+ def cmd(self, cmd: list[str]) -> Image: ...
594
596
  def imports(self): ...
595
597
 
596
598
  class ___logs_spec(typing_extensions.Protocol[SUPERSELF]):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: modal
3
- Version: 0.73.104
3
+ Version: 0.73.105
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -22,7 +22,7 @@ modal/app.py,sha256=ojhuLZuNZAQ1OsbDH0k6G4pm1W7bOIvZfXbaKlvQ-Ao,45622
22
22
  modal/app.pyi,sha256=tZFbcsu20SuvfB2puxCyuXLFNJ9bQulzag55rVpgZmc,26827
23
23
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
24
24
  modal/client.py,sha256=j9D3hNis1lfhnz9lVFGgJgowbH3PaGUzNKgHPWYG778,15372
25
- modal/client.pyi,sha256=irO6PatdCFhSti2GM1KRSeFb4DPF5CKfxPyDZuAV5lo,7661
25
+ modal/client.pyi,sha256=vLr_buXGEpKnVHJ66hj6mxSTgtDY0A5J08Z4x4JIb1M,7661
26
26
  modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
27
27
  modal/cloud_bucket_mount.pyi,sha256=30T3K1a89l6wzmEJ_J9iWv9SknoGqaZDx59Xs-ZQcmk,1607
28
28
  modal/cls.py,sha256=JhDbaZZHN52lqA_roY1BCbcN9BvbkUcdXiM2Kg9lIc0,31717
@@ -41,10 +41,10 @@ modal/file_io.py,sha256=lcMs_E9Xfm0YX1t9U2wNIBPnqHRxmImqjLW1GHqVmyg,20945
41
41
  modal/file_io.pyi,sha256=NTRft1tbPSWf9TlWVeZmTlgB5AZ_Zhu2srWIrWr7brk,9445
42
42
  modal/file_pattern_matcher.py,sha256=trosX-Bp7dOubudN1bLLhRAoidWy1TcoaR4Pv8CedWw,6497
43
43
  modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
44
- modal/functions.pyi,sha256=ujc6eIYyNmMn__4dpxEy85-vZmAniZv56D2A4uBgs6U,14377
44
+ modal/functions.pyi,sha256=D-PDJfSbwqMDXdq7Bxu2ErZRENo-tRgu_zPoB-jl0OU,14377
45
45
  modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
46
- modal/image.py,sha256=fWamISDhtUo-DRtIn9c8aevNE78HafOlG9Rn-otUZv8,90800
47
- modal/image.pyi,sha256=Im_ap8E2oxDXA6uHQExKtH0KlB17gg6dfgAaJwW38ts,25163
46
+ modal/image.py,sha256=o9wnpB03agSoErzh-odrKU2BprROxRZOWGJidjZeeds,91811
47
+ modal/image.pyi,sha256=DQ4DLOCPr6_yV7z4LS0bTY0rOyvQP9-dQOrzaW7pPG8,25260
48
48
  modal/io_streams.py,sha256=h5O2LmbRoT9l777z3TQhCAm-JF1r7avZ2ykXlejztDs,15163
49
49
  modal/io_streams.pyi,sha256=bJ7ZLmSmJ0nKoa6r4FJpbqvzdUVa0lEe0Fa-MMpMezU,5071
50
50
  modal/mount.py,sha256=JII0zTS1fPCcCbZgO18okkOuTDqYCxY1DIVa6i1E9cI,32196
@@ -169,10 +169,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
169
169
  modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
170
170
  modal_version/__init__.py,sha256=wiJQ53c-OMs0Xf1UeXOxQ7FwlV1VzIjnX6o-pRYZ_Pk,470
171
171
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
172
- modal_version/_version_generated.py,sha256=dNcd-Z7WCAj3SSHsu-nSpzjC6Hh0j_auPuQJtfqwTCQ,150
173
- modal-0.73.104.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
174
- modal-0.73.104.dist-info/METADATA,sha256=LjsBJ_LOb_CgsamFTdWz8jOGV7Sn_39-wIaltdBiq2A,2453
175
- modal-0.73.104.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
176
- modal-0.73.104.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
177
- modal-0.73.104.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
178
- modal-0.73.104.dist-info/RECORD,,
172
+ modal_version/_version_generated.py,sha256=AQJ4OlTWM73vwQ0-UvskgAHrh8aUu1JxD14Xs01FXqw,150
173
+ modal-0.73.105.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
174
+ modal-0.73.105.dist-info/METADATA,sha256=n6rOHxkL7wGLVNV5vswQPiNRLE3EH7cNUA1sWSDYyFI,2453
175
+ modal-0.73.105.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
176
+ modal-0.73.105.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
177
+ modal-0.73.105.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
178
+ modal-0.73.105.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2025
2
2
 
3
3
  # Note: Reset this value to -1 whenever you make a minor `0.X` release of the client.
4
- build_number = 104 # git: 63b1efa
4
+ build_number = 105 # git: 78b3be2