modal 0.72.20__py3-none-any.whl → 0.72.21__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/_tunnel.py +1 -1
- modal/client.pyi +2 -2
- modal/functions.pyi +6 -6
- modal/image.py +10 -4
- modal/mount.py +13 -4
- {modal-0.72.20.dist-info → modal-0.72.21.dist-info}/METADATA +1 -1
- {modal-0.72.20.dist-info → modal-0.72.21.dist-info}/RECORD +12 -12
- modal_version/_version_generated.py +1 -1
- {modal-0.72.20.dist-info → modal-0.72.21.dist-info}/LICENSE +0 -0
- {modal-0.72.20.dist-info → modal-0.72.21.dist-info}/WHEEL +0 -0
- {modal-0.72.20.dist-info → modal-0.72.21.dist-info}/entry_points.txt +0 -0
- {modal-0.72.20.dist-info → modal-0.72.21.dist-info}/top_level.txt +0 -0
modal/_tunnel.py
CHANGED
@@ -145,7 +145,7 @@ async def _forward(port: int, *, unencrypted: bool = False, client: Optional[_Cl
|
|
145
145
|
modal.Image.debian_slim()
|
146
146
|
.apt_install("openssh-server")
|
147
147
|
.run_commands("mkdir /run/sshd")
|
148
|
-
.
|
148
|
+
.add_local_file("~/.ssh/id_rsa.pub", "/root/.ssh/authorized_keys", copy=True)
|
149
149
|
)
|
150
150
|
|
151
151
|
|
modal/client.pyi
CHANGED
@@ -26,7 +26,7 @@ class _Client:
|
|
26
26
|
_stub: typing.Optional[modal_proto.api_grpc.ModalClientStub]
|
27
27
|
|
28
28
|
def __init__(
|
29
|
-
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.72.
|
29
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.72.21"
|
30
30
|
): ...
|
31
31
|
def is_closed(self) -> bool: ...
|
32
32
|
@property
|
@@ -81,7 +81,7 @@ class Client:
|
|
81
81
|
_stub: typing.Optional[modal_proto.api_grpc.ModalClientStub]
|
82
82
|
|
83
83
|
def __init__(
|
84
|
-
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.72.
|
84
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.72.21"
|
85
85
|
): ...
|
86
86
|
def is_closed(self) -> bool: ...
|
87
87
|
@property
|
modal/functions.pyi
CHANGED
@@ -462,11 +462,11 @@ class Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.O
|
|
462
462
|
|
463
463
|
_call_generator_nowait: ___call_generator_nowait_spec
|
464
464
|
|
465
|
-
class __remote_spec(typing_extensions.Protocol[
|
465
|
+
class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER]):
|
466
466
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
467
467
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
468
468
|
|
469
|
-
remote: __remote_spec[
|
469
|
+
remote: __remote_spec[P, ReturnType]
|
470
470
|
|
471
471
|
class __remote_gen_spec(typing_extensions.Protocol):
|
472
472
|
def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
|
@@ -479,17 +479,17 @@ class Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.O
|
|
479
479
|
def _get_obj(self) -> typing.Optional[modal.cls.Obj]: ...
|
480
480
|
def local(self, *args: P.args, **kwargs: P.kwargs) -> OriginalReturnType: ...
|
481
481
|
|
482
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
482
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER]):
|
483
483
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
484
484
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
485
485
|
|
486
|
-
_experimental_spawn: ___experimental_spawn_spec[
|
486
|
+
_experimental_spawn: ___experimental_spawn_spec[P, ReturnType]
|
487
487
|
|
488
|
-
class __spawn_spec(typing_extensions.Protocol[
|
488
|
+
class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER]):
|
489
489
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
490
490
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
491
491
|
|
492
|
-
spawn: __spawn_spec[
|
492
|
+
spawn: __spawn_spec[P, ReturnType]
|
493
493
|
|
494
494
|
def get_raw_f(self) -> typing.Callable[..., typing.Any]: ...
|
495
495
|
|
modal/image.py
CHANGED
@@ -662,13 +662,16 @@ class _Image(_Object, type_prefix="im"):
|
|
662
662
|
return obj
|
663
663
|
|
664
664
|
def copy_mount(self, mount: _Mount, remote_path: Union[str, Path] = ".") -> "_Image":
|
665
|
-
"""
|
665
|
+
"""
|
666
|
+
**Deprecated**: Use image.add_local_dir(..., copy=True) or similar instead.
|
667
|
+
|
668
|
+
Copy the entire contents of a `modal.Mount` into an image.
|
666
669
|
Useful when files only available locally are required during the image
|
667
670
|
build process.
|
668
671
|
|
669
672
|
**Example**
|
670
673
|
|
671
|
-
```python
|
674
|
+
```python notest
|
672
675
|
static_images_dir = "./static"
|
673
676
|
# place all static images in root of mount
|
674
677
|
mount = modal.Mount.from_local_dir(static_images_dir, remote_path="/")
|
@@ -851,14 +854,17 @@ class _Image(_Object, type_prefix="im"):
|
|
851
854
|
# Which follows dockerignore syntax.
|
852
855
|
ignore: Union[Sequence[str], Callable[[Path], bool]] = [],
|
853
856
|
) -> "_Image":
|
854
|
-
"""
|
857
|
+
"""
|
858
|
+
**Deprecated**: Use image.add_local_dir instead
|
859
|
+
|
860
|
+
Copy a directory into the image as a part of building the image.
|
855
861
|
|
856
862
|
This works in a similar way to [`COPY`](https://docs.docker.com/engine/reference/builder/#copy)
|
857
863
|
works in a `Dockerfile`.
|
858
864
|
|
859
865
|
**Usage:**
|
860
866
|
|
861
|
-
```python
|
867
|
+
```python notest
|
862
868
|
from pathlib import Path
|
863
869
|
from modal import FilePatternMatcher
|
864
870
|
|
modal/mount.py
CHANGED
@@ -258,12 +258,15 @@ class NonLocalMountError(Exception):
|
|
258
258
|
|
259
259
|
|
260
260
|
class _Mount(_Object, type_prefix="mo"):
|
261
|
-
"""
|
261
|
+
"""
|
262
|
+
**Deprecated**: Mounts should not be used explicitly anymore, use image.add_local_* commands instead
|
263
|
+
|
264
|
+
Create a mount for a local directory or file that can be attached
|
262
265
|
to one or more Modal functions.
|
263
266
|
|
264
267
|
**Usage**
|
265
268
|
|
266
|
-
```python
|
269
|
+
```python notest
|
267
270
|
import modal
|
268
271
|
import os
|
269
272
|
app = modal.App()
|
@@ -394,11 +397,13 @@ class _Mount(_Object, type_prefix="mo"):
|
|
394
397
|
recursive: bool = True,
|
395
398
|
) -> "_Mount":
|
396
399
|
"""
|
400
|
+
**Deprecated:** Use image.add_local_dir() instead
|
401
|
+
|
397
402
|
Create a `Mount` from a local directory.
|
398
403
|
|
399
404
|
**Usage**
|
400
405
|
|
401
|
-
```python
|
406
|
+
```python notest
|
402
407
|
assets = modal.Mount.from_local_dir(
|
403
408
|
"~/assets",
|
404
409
|
condition=lambda pth: not ".venv" in pth,
|
@@ -449,11 +454,13 @@ class _Mount(_Object, type_prefix="mo"):
|
|
449
454
|
@staticmethod
|
450
455
|
def from_local_file(local_path: Union[str, Path], remote_path: Union[str, PurePosixPath, None] = None) -> "_Mount":
|
451
456
|
"""
|
457
|
+
**Deprecated**: Use image.add_local_file() instead
|
458
|
+
|
452
459
|
Create a `Mount` mounting a single local file.
|
453
460
|
|
454
461
|
**Usage**
|
455
462
|
|
456
|
-
```python
|
463
|
+
```python notest
|
457
464
|
# Mount the DBT profile in user's home directory into container.
|
458
465
|
dbt_profiles = modal.Mount.from_local_file(
|
459
466
|
local_path="~/profiles.yml",
|
@@ -611,6 +618,8 @@ class _Mount(_Object, type_prefix="mo"):
|
|
611
618
|
ignore: Optional[Union[Sequence[str], Callable[[Path], bool]]] = None,
|
612
619
|
) -> "_Mount":
|
613
620
|
"""
|
621
|
+
**Deprecated**: Use image.add_local_python_source instead
|
622
|
+
|
614
623
|
Returns a `modal.Mount` that makes local modules listed in `module_names` available inside the container.
|
615
624
|
This works by mounting the local path of each module's package to a directory inside the container
|
616
625
|
that's on `PYTHONPATH`.
|
@@ -12,14 +12,14 @@ modal/_resolver.py,sha256=TtowKu2LdZ7NpiYkSXs058BZ4ivY8KVYdchqLfREkiA,6775
|
|
12
12
|
modal/_resources.py,sha256=5qmcirXUI8dSH926nwkUaeX9H25mqYu9mXD_KuT79-o,1733
|
13
13
|
modal/_serialization.py,sha256=qPLH6OUEBas1CT-a6i5pOP1hPGt5AfKr9q7RMUTFOMc,18722
|
14
14
|
modal/_traceback.py,sha256=IZQzB3fVlUfMHOSyKUgw0H6qv4yHnpyq-XVCNZKfUdA,5023
|
15
|
-
modal/_tunnel.py,sha256=
|
15
|
+
modal/_tunnel.py,sha256=zTBxBiuH1O22tS1OliAJdIsSmaZS8PlnifS_6S5z-mk,6320
|
16
16
|
modal/_tunnel.pyi,sha256=JmmDYAy9F1FpgJ_hWx0xkom2nTOFQjn4mTPYlU3PFo4,1245
|
17
17
|
modal/_watcher.py,sha256=K6LYnlmSGQB4tWWI9JADv-tvSvQ1j522FwT71B51CX8,3584
|
18
18
|
modal/app.py,sha256=t-INVjEAhSXppcu8m_rhaa1r5tzZmEPCS3lhAZg7xkc,45611
|
19
19
|
modal/app.pyi,sha256=279Tf7Jmwq_SvAm_BKRnollAqefYI22g7wQqP94Er1Y,25453
|
20
20
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
21
21
|
modal/client.py,sha256=JAnd4-GCN093BwkvOFAK5a6iy5ycxofjpUncMxlrIMw,15253
|
22
|
-
modal/client.pyi,sha256=
|
22
|
+
modal/client.pyi,sha256=aGTbWWyktsgcmwlTAXb6k2clqWvb5s6RkL2NLyutDTU,7280
|
23
23
|
modal/cloud_bucket_mount.py,sha256=G7T7jWLD0QkmrfKR75mSTwdUZ2xNfj7pkVqb4ipmxmI,5735
|
24
24
|
modal/cloud_bucket_mount.pyi,sha256=CEi7vrH3kDUF4LAy4qP6tfImy2UJuFRcRbsgRNM1wo8,1403
|
25
25
|
modal/cls.py,sha256=jbGYPMM1AhS3Uj8Wh2lk0YARDCul_imUDiJmbyrfSSc,32158
|
@@ -37,13 +37,13 @@ modal/file_io.py,sha256=lcMs_E9Xfm0YX1t9U2wNIBPnqHRxmImqjLW1GHqVmyg,20945
|
|
37
37
|
modal/file_io.pyi,sha256=NrIoB0YjIqZ8MDMe826xAnybT0ww_kxQM3iPLo82REU,8898
|
38
38
|
modal/file_pattern_matcher.py,sha256=dSo7BMQGZBAuoBFOX-e_72HxmF3FLzjQlEtnGtJiaD4,6506
|
39
39
|
modal/functions.py,sha256=3uJPbrEAWhpFfLfUnoRjGmvEUC-_wVh-8yNJBx8eVeM,68249
|
40
|
-
modal/functions.pyi,sha256=
|
40
|
+
modal/functions.pyi,sha256=LiSDgH-X7jcZ56pAoLMwo3x9Dzdp_3Sd7W5MVAJPoCg,25407
|
41
41
|
modal/gpu.py,sha256=MTxj6ql8EpgfBg8YmZ5a1cLznyuZFssX1qXbEX4LKVM,7503
|
42
|
-
modal/image.py,sha256=
|
42
|
+
modal/image.py,sha256=IRNG4g6mrx7sf038yVWCBK3AU2IEJjibt0OqNvLNtGU,90921
|
43
43
|
modal/image.pyi,sha256=NfZyLkl4rmxpc5fokaO4mmEeGFOwGn0AndV1vKwBdbs,26027
|
44
44
|
modal/io_streams.py,sha256=QkQiizKRzd5bnbKQsap31LJgBYlAnj4-XkV_50xPYX0,15079
|
45
45
|
modal/io_streams.pyi,sha256=bCCVSxkMcosYd8O3PQDDwJw7TQ8JEcnYonLJ5t27TQs,4804
|
46
|
-
modal/mount.py,sha256=
|
46
|
+
modal/mount.py,sha256=JVaJ9znu81WKP3Wjn3vvAIkaSnEgRSQqppXz6Fh_G6o,31798
|
47
47
|
modal/mount.pyi,sha256=mcKMYwt8dX3oO8OzzKqCdh7K2EhMhWIHEPoJwzi1rl8,12194
|
48
48
|
modal/network_file_system.py,sha256=INj1TfN_Fsmabmlte7anvey1epodjbMmjBW_TIJSST4,14406
|
49
49
|
modal/network_file_system.pyi,sha256=61M-sdWrtaRjmuNVsvusI6kf1Qw-jUOVXvEAeOkM8Aw,7751
|
@@ -165,10 +165,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
|
|
165
165
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
166
166
|
modal_version/__init__.py,sha256=kGya2ZlItX2zB7oHORs-wvP4PG8lg_mtbi1QIK3G6SQ,470
|
167
167
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
168
|
-
modal_version/_version_generated.py,sha256=
|
169
|
-
modal-0.72.
|
170
|
-
modal-0.72.
|
171
|
-
modal-0.72.
|
172
|
-
modal-0.72.
|
173
|
-
modal-0.72.
|
174
|
-
modal-0.72.
|
168
|
+
modal_version/_version_generated.py,sha256=zszePePZlKIur-4eGGPVqHGOUFtIr_f0irJ0aBbKJKs,149
|
169
|
+
modal-0.72.21.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
170
|
+
modal-0.72.21.dist-info/METADATA,sha256=NlMtlDzDoHG-x8LzqIcHfsmeWsidEr-JVsmJKNYqxUQ,2329
|
171
|
+
modal-0.72.21.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
172
|
+
modal-0.72.21.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
173
|
+
modal-0.72.21.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
|
174
|
+
modal-0.72.21.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|