modal 0.62.115__py3-none-any.whl → 0.72.13__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/__init__.py +13 -9
- modal/__main__.py +41 -3
- modal/_clustered_functions.py +80 -0
- modal/_clustered_functions.pyi +22 -0
- modal/_container_entrypoint.py +402 -398
- modal/_ipython.py +3 -13
- modal/_location.py +17 -10
- modal/_output.py +243 -99
- modal/_pty.py +2 -2
- modal/_resolver.py +55 -60
- modal/_resources.py +26 -7
- modal/_runtime/__init__.py +1 -0
- modal/_runtime/asgi.py +519 -0
- modal/_runtime/container_io_manager.py +1025 -0
- modal/{execution_context.py → _runtime/execution_context.py} +11 -2
- modal/_runtime/telemetry.py +169 -0
- modal/_runtime/user_code_imports.py +356 -0
- modal/_serialization.py +123 -6
- modal/_traceback.py +47 -187
- modal/_tunnel.py +50 -14
- modal/_tunnel.pyi +19 -36
- modal/_utils/app_utils.py +3 -17
- modal/_utils/async_utils.py +386 -104
- modal/_utils/blob_utils.py +157 -186
- modal/_utils/bytes_io_segment_payload.py +97 -0
- modal/_utils/deprecation.py +89 -0
- modal/_utils/docker_utils.py +98 -0
- modal/_utils/function_utils.py +299 -98
- modal/_utils/grpc_testing.py +47 -34
- modal/_utils/grpc_utils.py +54 -21
- modal/_utils/hash_utils.py +51 -10
- modal/_utils/http_utils.py +39 -9
- modal/_utils/logger.py +2 -1
- modal/_utils/mount_utils.py +34 -16
- modal/_utils/name_utils.py +58 -0
- modal/_utils/package_utils.py +14 -1
- modal/_utils/pattern_utils.py +205 -0
- modal/_utils/rand_pb_testing.py +3 -3
- modal/_utils/shell_utils.py +15 -49
- modal/_vendor/a2wsgi_wsgi.py +62 -72
- modal/_vendor/cloudpickle.py +1 -1
- modal/_watcher.py +12 -10
- modal/app.py +561 -323
- modal/app.pyi +474 -262
- modal/call_graph.py +7 -6
- modal/cli/_download.py +22 -6
- modal/cli/_traceback.py +200 -0
- modal/cli/app.py +203 -42
- modal/cli/config.py +12 -5
- modal/cli/container.py +61 -13
- modal/cli/dict.py +128 -0
- modal/cli/entry_point.py +26 -13
- modal/cli/environment.py +40 -9
- modal/cli/import_refs.py +21 -48
- modal/cli/launch.py +28 -14
- modal/cli/network_file_system.py +57 -21
- modal/cli/profile.py +1 -1
- modal/cli/programs/run_jupyter.py +34 -9
- modal/cli/programs/vscode.py +58 -8
- modal/cli/queues.py +131 -0
- modal/cli/run.py +199 -96
- modal/cli/secret.py +5 -4
- modal/cli/token.py +7 -2
- modal/cli/utils.py +74 -8
- modal/cli/volume.py +97 -56
- modal/client.py +248 -144
- modal/client.pyi +156 -124
- modal/cloud_bucket_mount.py +43 -30
- modal/cloud_bucket_mount.pyi +32 -25
- modal/cls.py +528 -141
- modal/cls.pyi +189 -145
- modal/config.py +32 -15
- modal/container_process.py +177 -0
- modal/container_process.pyi +82 -0
- modal/dict.py +50 -54
- modal/dict.pyi +120 -164
- modal/environments.py +106 -5
- modal/environments.pyi +77 -25
- modal/exception.py +30 -43
- modal/experimental.py +62 -2
- modal/file_io.py +537 -0
- modal/file_io.pyi +235 -0
- modal/file_pattern_matcher.py +196 -0
- modal/functions.py +846 -428
- modal/functions.pyi +446 -387
- modal/gpu.py +57 -44
- modal/image.py +943 -417
- modal/image.pyi +584 -245
- modal/io_streams.py +434 -0
- modal/io_streams.pyi +122 -0
- modal/mount.py +223 -90
- modal/mount.pyi +241 -243
- modal/network_file_system.py +85 -86
- modal/network_file_system.pyi +151 -110
- modal/object.py +66 -36
- modal/object.pyi +166 -143
- modal/output.py +63 -0
- modal/parallel_map.py +73 -47
- modal/parallel_map.pyi +51 -63
- modal/partial_function.py +272 -107
- modal/partial_function.pyi +219 -120
- modal/proxy.py +15 -12
- modal/proxy.pyi +3 -8
- modal/queue.py +96 -72
- modal/queue.pyi +210 -135
- modal/requirements/2024.04.txt +2 -1
- modal/requirements/2024.10.txt +16 -0
- modal/requirements/README.md +21 -0
- modal/requirements/base-images.json +22 -0
- modal/retries.py +45 -4
- modal/runner.py +325 -203
- modal/runner.pyi +124 -110
- modal/running_app.py +27 -4
- modal/sandbox.py +509 -231
- modal/sandbox.pyi +396 -169
- modal/schedule.py +2 -2
- modal/scheduler_placement.py +20 -3
- modal/secret.py +41 -25
- modal/secret.pyi +62 -42
- modal/serving.py +39 -49
- modal/serving.pyi +37 -43
- modal/stream_type.py +15 -0
- modal/token_flow.py +5 -3
- modal/token_flow.pyi +37 -32
- modal/volume.py +123 -137
- modal/volume.pyi +228 -221
- {modal-0.62.115.dist-info → modal-0.72.13.dist-info}/METADATA +5 -5
- modal-0.72.13.dist-info/RECORD +174 -0
- {modal-0.62.115.dist-info → modal-0.72.13.dist-info}/top_level.txt +0 -1
- modal_docs/gen_reference_docs.py +3 -1
- modal_docs/mdmd/mdmd.py +0 -1
- modal_docs/mdmd/signatures.py +1 -2
- modal_global_objects/images/base_images.py +28 -0
- modal_global_objects/mounts/python_standalone.py +2 -2
- modal_proto/__init__.py +1 -1
- modal_proto/api.proto +1231 -531
- modal_proto/api_grpc.py +750 -430
- modal_proto/api_pb2.py +2102 -1176
- modal_proto/api_pb2.pyi +8859 -0
- modal_proto/api_pb2_grpc.py +1329 -675
- modal_proto/api_pb2_grpc.pyi +1416 -0
- modal_proto/modal_api_grpc.py +149 -0
- modal_proto/modal_options_grpc.py +3 -0
- modal_proto/options_pb2.pyi +20 -0
- modal_proto/options_pb2_grpc.pyi +7 -0
- modal_proto/py.typed +0 -0
- modal_version/__init__.py +1 -1
- modal_version/_version_generated.py +2 -2
- modal/_asgi.py +0 -370
- modal/_container_exec.py +0 -128
- modal/_container_io_manager.py +0 -646
- modal/_container_io_manager.pyi +0 -412
- modal/_sandbox_shell.py +0 -49
- modal/app_utils.py +0 -20
- modal/app_utils.pyi +0 -17
- modal/execution_context.pyi +0 -37
- modal/shared_volume.py +0 -23
- modal/shared_volume.pyi +0 -24
- modal-0.62.115.dist-info/RECORD +0 -207
- modal_global_objects/images/conda.py +0 -15
- modal_global_objects/images/debian_slim.py +0 -15
- modal_global_objects/images/micromamba.py +0 -15
- test/__init__.py +0 -1
- test/aio_test.py +0 -12
- test/async_utils_test.py +0 -279
- test/blob_test.py +0 -67
- test/cli_imports_test.py +0 -149
- test/cli_test.py +0 -674
- test/client_test.py +0 -203
- test/cloud_bucket_mount_test.py +0 -22
- test/cls_test.py +0 -636
- test/config_test.py +0 -149
- test/conftest.py +0 -1485
- test/container_app_test.py +0 -50
- test/container_test.py +0 -1405
- test/cpu_test.py +0 -23
- test/decorator_test.py +0 -85
- test/deprecation_test.py +0 -34
- test/dict_test.py +0 -51
- test/e2e_test.py +0 -68
- test/error_test.py +0 -7
- test/function_serialization_test.py +0 -32
- test/function_test.py +0 -791
- test/function_utils_test.py +0 -101
- test/gpu_test.py +0 -159
- test/grpc_utils_test.py +0 -82
- test/helpers.py +0 -47
- test/image_test.py +0 -814
- test/live_reload_test.py +0 -80
- test/lookup_test.py +0 -70
- test/mdmd_test.py +0 -329
- test/mount_test.py +0 -162
- test/mounted_files_test.py +0 -327
- test/network_file_system_test.py +0 -188
- test/notebook_test.py +0 -66
- test/object_test.py +0 -41
- test/package_utils_test.py +0 -25
- test/queue_test.py +0 -115
- test/resolver_test.py +0 -59
- test/retries_test.py +0 -67
- test/runner_test.py +0 -85
- test/sandbox_test.py +0 -191
- test/schedule_test.py +0 -15
- test/scheduler_placement_test.py +0 -57
- test/secret_test.py +0 -89
- test/serialization_test.py +0 -50
- test/stub_composition_test.py +0 -10
- test/stub_test.py +0 -361
- test/test_asgi_wrapper.py +0 -234
- test/token_flow_test.py +0 -18
- test/traceback_test.py +0 -135
- test/tunnel_test.py +0 -29
- test/utils_test.py +0 -88
- test/version_test.py +0 -14
- test/volume_test.py +0 -397
- test/watcher_test.py +0 -58
- test/webhook_test.py +0 -145
- {modal-0.62.115.dist-info → modal-0.72.13.dist-info}/LICENSE +0 -0
- {modal-0.62.115.dist-info → modal-0.72.13.dist-info}/WHEEL +0 -0
- {modal-0.62.115.dist-info → modal-0.72.13.dist-info}/entry_points.txt +0 -0
modal/image.pyi
CHANGED
@@ -1,285 +1,624 @@
|
|
1
|
+
import collections.abc
|
1
2
|
import google.protobuf.message
|
3
|
+
import modal.client
|
4
|
+
import modal.cloud_bucket_mount
|
2
5
|
import modal.functions
|
3
6
|
import modal.gpu
|
4
7
|
import modal.mount
|
5
8
|
import modal.network_file_system
|
6
9
|
import modal.object
|
7
10
|
import modal.secret
|
11
|
+
import modal.volume
|
8
12
|
import modal_proto.api_pb2
|
9
13
|
import pathlib
|
10
14
|
import typing
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
def
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
def
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
def _flatten_str_args(
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
def
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
15
|
+
import typing_extensions
|
16
|
+
|
17
|
+
ImageBuilderVersion = typing.Literal["2023.12", "2024.04", "2024.10"]
|
18
|
+
|
19
|
+
class _AutoDockerIgnoreSentinel:
|
20
|
+
def __repr__(self) -> str: ...
|
21
|
+
def __call__(self, _: pathlib.Path) -> bool: ...
|
22
|
+
|
23
|
+
AUTO_DOCKERIGNORE: _AutoDockerIgnoreSentinel
|
24
|
+
|
25
|
+
def _validate_python_version(
|
26
|
+
python_version: typing.Optional[str],
|
27
|
+
builder_version: typing.Literal["2023.12", "2024.04", "2024.10"],
|
28
|
+
allow_micro_granularity: bool = True,
|
29
|
+
) -> str: ...
|
30
|
+
def _dockerhub_python_version(
|
31
|
+
builder_version: typing.Literal["2023.12", "2024.04", "2024.10"], python_version: typing.Optional[str] = None
|
32
|
+
) -> str: ...
|
33
|
+
def _base_image_config(group: str, builder_version: typing.Literal["2023.12", "2024.04", "2024.10"]) -> typing.Any: ...
|
34
|
+
def _get_modal_requirements_path(
|
35
|
+
builder_version: typing.Literal["2023.12", "2024.04", "2024.10"], python_version: typing.Optional[str] = None
|
36
|
+
) -> str: ...
|
37
|
+
def _get_modal_requirements_command(version: typing.Literal["2023.12", "2024.04", "2024.10"]) -> str: ...
|
38
|
+
def _flatten_str_args(
|
39
|
+
function_name: str, arg_name: str, args: collections.abc.Sequence[typing.Union[str, list[str]]]
|
40
|
+
) -> list[str]: ...
|
41
|
+
def _validate_packages(packages: list[str]) -> bool: ...
|
42
|
+
def _warn_invalid_packages(old_command: str) -> None: ...
|
43
|
+
def _make_pip_install_args(
|
44
|
+
find_links: typing.Optional[str] = None,
|
45
|
+
index_url: typing.Optional[str] = None,
|
46
|
+
extra_index_url: typing.Optional[str] = None,
|
47
|
+
pre: bool = False,
|
48
|
+
extra_options: str = "",
|
49
|
+
) -> str: ...
|
50
|
+
def _get_image_builder_version(
|
51
|
+
server_version: typing.Literal["2023.12", "2024.04", "2024.10"],
|
52
|
+
) -> typing.Literal["2023.12", "2024.04", "2024.10"]: ...
|
53
|
+
def _create_context_mount(
|
54
|
+
docker_commands: collections.abc.Sequence[str],
|
55
|
+
ignore_fn: typing.Callable[[pathlib.Path], bool],
|
56
|
+
context_dir: pathlib.Path,
|
57
|
+
) -> typing.Optional[modal.mount._Mount]: ...
|
58
|
+
def _create_context_mount_function(
|
59
|
+
ignore: typing.Union[collections.abc.Sequence[str], typing.Callable[[pathlib.Path], bool]],
|
60
|
+
dockerfile_cmds: list[str] = [],
|
61
|
+
dockerfile_path: typing.Optional[pathlib.Path] = None,
|
62
|
+
context_mount: typing.Optional[modal.mount._Mount] = None,
|
63
|
+
): ...
|
45
64
|
|
46
65
|
class _ImageRegistryConfig:
|
47
|
-
def __init__(self, registry_auth_type: int = 0, secret: typing.
|
48
|
-
|
49
|
-
|
50
|
-
def get_proto(self) -> modal_proto.api_pb2.ImageRegistryConfig:
|
51
|
-
...
|
52
|
-
|
66
|
+
def __init__(self, registry_auth_type: int = 0, secret: typing.Optional[modal.secret._Secret] = None): ...
|
67
|
+
def get_proto(self) -> modal_proto.api_pb2.ImageRegistryConfig: ...
|
53
68
|
|
54
69
|
class DockerfileSpec:
|
55
|
-
commands:
|
56
|
-
context_files:
|
57
|
-
|
58
|
-
def __init__(self, commands: typing.List[str], context_files: typing.Dict[str, str]) -> None:
|
59
|
-
...
|
70
|
+
commands: list[str]
|
71
|
+
context_files: dict[str, str]
|
60
72
|
|
61
|
-
def
|
62
|
-
|
63
|
-
|
64
|
-
def __eq__(self, other):
|
65
|
-
...
|
73
|
+
def __init__(self, commands: list[str], context_files: dict[str, str]) -> None: ...
|
74
|
+
def __repr__(self): ...
|
75
|
+
def __eq__(self, other): ...
|
66
76
|
|
77
|
+
async def _image_await_build_result(
|
78
|
+
image_id: str, client: modal.client._Client
|
79
|
+
) -> modal_proto.api_pb2.ImageJoinStreamingResponse: ...
|
67
80
|
|
68
81
|
class _Image(modal.object._Object):
|
69
82
|
force_build: bool
|
70
|
-
inside_exceptions:
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
def
|
76
|
-
|
77
|
-
|
83
|
+
inside_exceptions: list[Exception]
|
84
|
+
_serve_mounts: frozenset[modal.mount._Mount]
|
85
|
+
_deferred_mounts: collections.abc.Sequence[modal.mount._Mount]
|
86
|
+
_metadata: typing.Optional[modal_proto.api_pb2.ImageMetadata]
|
87
|
+
|
88
|
+
def _initialize_from_empty(self): ...
|
89
|
+
def _initialize_from_other(self, other: _Image): ...
|
90
|
+
def _hydrate_metadata(self, metadata: typing.Optional[google.protobuf.message.Message]): ...
|
91
|
+
def _add_mount_layer_or_copy(self, mount: modal.mount._Mount, copy: bool = False): ...
|
92
|
+
@property
|
93
|
+
def _mount_layers(self) -> typing.Sequence[modal.mount._Mount]: ...
|
94
|
+
def _assert_no_mount_layers(self): ...
|
78
95
|
@staticmethod
|
79
|
-
def _from_args(
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
96
|
+
def _from_args(
|
97
|
+
*,
|
98
|
+
base_images: typing.Optional[dict[str, _Image]] = None,
|
99
|
+
dockerfile_function: typing.Optional[
|
100
|
+
typing.Callable[[typing.Literal["2023.12", "2024.04", "2024.10"]], DockerfileSpec]
|
101
|
+
] = None,
|
102
|
+
secrets: typing.Optional[collections.abc.Sequence[modal.secret._Secret]] = None,
|
103
|
+
gpu_config: typing.Optional[modal_proto.api_pb2.GPUConfig] = None,
|
104
|
+
build_function: typing.Optional[modal.functions._Function] = None,
|
105
|
+
build_function_input: typing.Optional[modal_proto.api_pb2.FunctionInput] = None,
|
106
|
+
image_registry_config: typing.Optional[_ImageRegistryConfig] = None,
|
107
|
+
context_mount_function: typing.Optional[typing.Callable[[], typing.Optional[modal.mount._Mount]]] = None,
|
108
|
+
force_build: bool = False,
|
109
|
+
_namespace: int = 1,
|
110
|
+
_do_assert_no_mount_layers: bool = True,
|
111
|
+
): ...
|
112
|
+
def copy_mount(self, mount: modal.mount._Mount, remote_path: typing.Union[str, pathlib.Path] = ".") -> _Image: ...
|
113
|
+
def add_local_file(
|
114
|
+
self, local_path: typing.Union[str, pathlib.Path], remote_path: str, *, copy: bool = False
|
115
|
+
) -> _Image: ...
|
116
|
+
def add_local_dir(
|
117
|
+
self,
|
118
|
+
local_path: typing.Union[str, pathlib.Path],
|
119
|
+
remote_path: str,
|
120
|
+
*,
|
121
|
+
copy: bool = False,
|
122
|
+
ignore: typing.Union[collections.abc.Sequence[str], typing.Callable[[pathlib.Path], bool]] = [],
|
123
|
+
) -> _Image: ...
|
124
|
+
def copy_local_file(
|
125
|
+
self, local_path: typing.Union[str, pathlib.Path], remote_path: typing.Union[str, pathlib.Path] = "./"
|
126
|
+
) -> _Image: ...
|
127
|
+
def add_local_python_source(
|
128
|
+
self,
|
129
|
+
*module_names: str,
|
130
|
+
copy: bool = False,
|
131
|
+
ignore: typing.Union[
|
132
|
+
collections.abc.Sequence[str], typing.Callable[[pathlib.Path], bool]
|
133
|
+
] = modal.file_pattern_matcher.NON_PYTHON_FILES,
|
134
|
+
) -> _Image: ...
|
135
|
+
def copy_local_dir(
|
136
|
+
self,
|
137
|
+
local_path: typing.Union[str, pathlib.Path],
|
138
|
+
remote_path: typing.Union[str, pathlib.Path] = ".",
|
139
|
+
ignore: typing.Union[collections.abc.Sequence[str], typing.Callable[[pathlib.Path], bool]] = [],
|
140
|
+
) -> _Image: ...
|
115
141
|
@staticmethod
|
116
|
-
def
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
142
|
+
async def from_id(image_id: str, client: typing.Optional[modal.client._Client] = None) -> _Image: ...
|
143
|
+
def pip_install(
|
144
|
+
self,
|
145
|
+
*packages: typing.Union[str, list[str]],
|
146
|
+
find_links: typing.Optional[str] = None,
|
147
|
+
index_url: typing.Optional[str] = None,
|
148
|
+
extra_index_url: typing.Optional[str] = None,
|
149
|
+
pre: bool = False,
|
150
|
+
extra_options: str = "",
|
151
|
+
force_build: bool = False,
|
152
|
+
secrets: collections.abc.Sequence[modal.secret._Secret] = [],
|
153
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
154
|
+
) -> _Image: ...
|
155
|
+
def pip_install_private_repos(
|
156
|
+
self,
|
157
|
+
*repositories: str,
|
158
|
+
git_user: str,
|
159
|
+
find_links: typing.Optional[str] = None,
|
160
|
+
index_url: typing.Optional[str] = None,
|
161
|
+
extra_index_url: typing.Optional[str] = None,
|
162
|
+
pre: bool = False,
|
163
|
+
extra_options: str = "",
|
164
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
165
|
+
secrets: collections.abc.Sequence[modal.secret._Secret] = [],
|
166
|
+
force_build: bool = False,
|
167
|
+
) -> _Image: ...
|
168
|
+
def pip_install_from_requirements(
|
169
|
+
self,
|
170
|
+
requirements_txt: str,
|
171
|
+
find_links: typing.Optional[str] = None,
|
172
|
+
*,
|
173
|
+
index_url: typing.Optional[str] = None,
|
174
|
+
extra_index_url: typing.Optional[str] = None,
|
175
|
+
pre: bool = False,
|
176
|
+
extra_options: str = "",
|
177
|
+
force_build: bool = False,
|
178
|
+
secrets: collections.abc.Sequence[modal.secret._Secret] = [],
|
179
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
180
|
+
) -> _Image: ...
|
181
|
+
def pip_install_from_pyproject(
|
182
|
+
self,
|
183
|
+
pyproject_toml: str,
|
184
|
+
optional_dependencies: list[str] = [],
|
185
|
+
*,
|
186
|
+
find_links: typing.Optional[str] = None,
|
187
|
+
index_url: typing.Optional[str] = None,
|
188
|
+
extra_index_url: typing.Optional[str] = None,
|
189
|
+
pre: bool = False,
|
190
|
+
extra_options: str = "",
|
191
|
+
force_build: bool = False,
|
192
|
+
secrets: collections.abc.Sequence[modal.secret._Secret] = [],
|
193
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
194
|
+
) -> _Image: ...
|
195
|
+
def poetry_install_from_file(
|
196
|
+
self,
|
197
|
+
poetry_pyproject_toml: str,
|
198
|
+
poetry_lockfile: typing.Optional[str] = None,
|
199
|
+
ignore_lockfile: bool = False,
|
200
|
+
old_installer: bool = False,
|
201
|
+
force_build: bool = False,
|
202
|
+
with_: list[str] = [],
|
203
|
+
without: list[str] = [],
|
204
|
+
only: list[str] = [],
|
205
|
+
*,
|
206
|
+
secrets: collections.abc.Sequence[modal.secret._Secret] = [],
|
207
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
208
|
+
) -> _Image: ...
|
209
|
+
def dockerfile_commands(
|
210
|
+
self,
|
211
|
+
*dockerfile_commands: typing.Union[str, list[str]],
|
212
|
+
context_files: dict[str, str] = {},
|
213
|
+
secrets: collections.abc.Sequence[modal.secret._Secret] = [],
|
214
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
215
|
+
context_mount: typing.Optional[modal.mount._Mount] = None,
|
216
|
+
force_build: bool = False,
|
217
|
+
ignore: typing.Union[
|
218
|
+
collections.abc.Sequence[str], typing.Callable[[pathlib.Path], bool]
|
219
|
+
] = modal.image.AUTO_DOCKERIGNORE,
|
220
|
+
) -> _Image: ...
|
221
|
+
def entrypoint(self, entrypoint_commands: list[str]) -> _Image: ...
|
222
|
+
def shell(self, shell_commands: list[str]) -> _Image: ...
|
223
|
+
def run_commands(
|
224
|
+
self,
|
225
|
+
*commands: typing.Union[str, list[str]],
|
226
|
+
secrets: collections.abc.Sequence[modal.secret._Secret] = [],
|
227
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
228
|
+
force_build: bool = False,
|
229
|
+
) -> _Image: ...
|
125
230
|
@staticmethod
|
126
|
-
def
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
231
|
+
def conda(python_version: typing.Optional[str] = None, force_build: bool = False): ...
|
232
|
+
def conda_install(
|
233
|
+
self,
|
234
|
+
*packages: typing.Union[str, list[str]],
|
235
|
+
channels: list[str] = [],
|
236
|
+
force_build: bool = False,
|
237
|
+
secrets: collections.abc.Sequence[modal.secret._Secret] = [],
|
238
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
239
|
+
): ...
|
240
|
+
def conda_update_from_environment(
|
241
|
+
self,
|
242
|
+
environment_yml: str,
|
243
|
+
force_build: bool = False,
|
244
|
+
*,
|
245
|
+
secrets: collections.abc.Sequence[modal.secret._Secret] = [],
|
246
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
247
|
+
): ...
|
132
248
|
@staticmethod
|
133
|
-
def
|
134
|
-
|
135
|
-
|
249
|
+
def micromamba(python_version: typing.Optional[str] = None, force_build: bool = False) -> _Image: ...
|
250
|
+
def micromamba_install(
|
251
|
+
self,
|
252
|
+
*packages: typing.Union[str, list[str]],
|
253
|
+
spec_file: typing.Optional[str] = None,
|
254
|
+
channels: list[str] = [],
|
255
|
+
force_build: bool = False,
|
256
|
+
secrets: collections.abc.Sequence[modal.secret._Secret] = [],
|
257
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
258
|
+
) -> _Image: ...
|
136
259
|
@staticmethod
|
137
|
-
def
|
138
|
-
|
139
|
-
|
260
|
+
def _registry_setup_commands(
|
261
|
+
tag: str,
|
262
|
+
builder_version: typing.Literal["2023.12", "2024.04", "2024.10"],
|
263
|
+
setup_commands: list[str],
|
264
|
+
add_python: typing.Optional[str] = None,
|
265
|
+
) -> list[str]: ...
|
140
266
|
@staticmethod
|
141
|
-
def
|
142
|
-
|
143
|
-
|
267
|
+
def from_registry(
|
268
|
+
tag: str,
|
269
|
+
*,
|
270
|
+
secret: typing.Optional[modal.secret._Secret] = None,
|
271
|
+
setup_dockerfile_commands: list[str] = [],
|
272
|
+
force_build: bool = False,
|
273
|
+
add_python: typing.Optional[str] = None,
|
274
|
+
**kwargs,
|
275
|
+
) -> _Image: ...
|
144
276
|
@staticmethod
|
145
|
-
def
|
146
|
-
|
147
|
-
|
277
|
+
def from_gcp_artifact_registry(
|
278
|
+
tag: str,
|
279
|
+
secret: typing.Optional[modal.secret._Secret] = None,
|
280
|
+
*,
|
281
|
+
setup_dockerfile_commands: list[str] = [],
|
282
|
+
force_build: bool = False,
|
283
|
+
add_python: typing.Optional[str] = None,
|
284
|
+
**kwargs,
|
285
|
+
) -> _Image: ...
|
148
286
|
@staticmethod
|
149
|
-
def
|
150
|
-
|
151
|
-
|
287
|
+
def from_aws_ecr(
|
288
|
+
tag: str,
|
289
|
+
secret: typing.Optional[modal.secret._Secret] = None,
|
290
|
+
*,
|
291
|
+
setup_dockerfile_commands: list[str] = [],
|
292
|
+
force_build: bool = False,
|
293
|
+
add_python: typing.Optional[str] = None,
|
294
|
+
**kwargs,
|
295
|
+
) -> _Image: ...
|
152
296
|
@staticmethod
|
153
|
-
def
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
297
|
+
def from_dockerfile(
|
298
|
+
path: typing.Union[str, pathlib.Path],
|
299
|
+
context_mount: typing.Optional[modal.mount._Mount] = None,
|
300
|
+
force_build: bool = False,
|
301
|
+
*,
|
302
|
+
secrets: collections.abc.Sequence[modal.secret._Secret] = [],
|
303
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
304
|
+
add_python: typing.Optional[str] = None,
|
305
|
+
ignore: typing.Union[
|
306
|
+
collections.abc.Sequence[str], typing.Callable[[pathlib.Path], bool]
|
307
|
+
] = modal.image.AUTO_DOCKERIGNORE,
|
308
|
+
) -> _Image: ...
|
309
|
+
@staticmethod
|
310
|
+
def debian_slim(python_version: typing.Optional[str] = None, force_build: bool = False) -> _Image: ...
|
311
|
+
def apt_install(
|
312
|
+
self,
|
313
|
+
*packages: typing.Union[str, list[str]],
|
314
|
+
force_build: bool = False,
|
315
|
+
secrets: collections.abc.Sequence[modal.secret._Secret] = [],
|
316
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
317
|
+
) -> _Image: ...
|
318
|
+
def run_function(
|
319
|
+
self,
|
320
|
+
raw_f: typing.Callable[..., typing.Any],
|
321
|
+
secrets: collections.abc.Sequence[modal.secret._Secret] = (),
|
322
|
+
gpu: typing.Union[
|
323
|
+
None, bool, str, modal.gpu._GPUConfig, list[typing.Union[None, bool, str, modal.gpu._GPUConfig]]
|
324
|
+
] = None,
|
325
|
+
mounts: collections.abc.Sequence[modal.mount._Mount] = (),
|
326
|
+
volumes: dict[
|
327
|
+
typing.Union[str, pathlib.PurePosixPath],
|
328
|
+
typing.Union[modal.volume._Volume, modal.cloud_bucket_mount._CloudBucketMount],
|
329
|
+
] = {},
|
330
|
+
network_file_systems: dict[
|
331
|
+
typing.Union[str, pathlib.PurePosixPath], modal.network_file_system._NetworkFileSystem
|
332
|
+
] = {},
|
333
|
+
cpu: typing.Optional[float] = None,
|
334
|
+
memory: typing.Optional[int] = None,
|
335
|
+
timeout: typing.Optional[int] = 3600,
|
336
|
+
force_build: bool = False,
|
337
|
+
cloud: typing.Optional[str] = None,
|
338
|
+
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
339
|
+
args: collections.abc.Sequence[typing.Any] = (),
|
340
|
+
kwargs: dict[str, typing.Any] = {},
|
341
|
+
) -> _Image: ...
|
342
|
+
def env(self, vars: dict[str, str]) -> _Image: ...
|
343
|
+
def workdir(self, path: typing.Union[str, pathlib.PurePosixPath]) -> _Image: ...
|
344
|
+
def imports(self): ...
|
345
|
+
def _logs(self) -> typing.AsyncGenerator[str, None]: ...
|
174
346
|
|
175
347
|
class Image(modal.object.Object):
|
176
348
|
force_build: bool
|
177
|
-
inside_exceptions:
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
def
|
183
|
-
|
184
|
-
|
185
|
-
def _hydrate_metadata(self,
|
186
|
-
|
187
|
-
|
349
|
+
inside_exceptions: list[Exception]
|
350
|
+
_serve_mounts: frozenset[modal.mount.Mount]
|
351
|
+
_deferred_mounts: collections.abc.Sequence[modal.mount.Mount]
|
352
|
+
_metadata: typing.Optional[modal_proto.api_pb2.ImageMetadata]
|
353
|
+
|
354
|
+
def __init__(self, *args, **kwargs): ...
|
355
|
+
def _initialize_from_empty(self): ...
|
356
|
+
def _initialize_from_other(self, other: Image): ...
|
357
|
+
def _hydrate_metadata(self, metadata: typing.Optional[google.protobuf.message.Message]): ...
|
358
|
+
def _add_mount_layer_or_copy(self, mount: modal.mount.Mount, copy: bool = False): ...
|
359
|
+
@property
|
360
|
+
def _mount_layers(self) -> typing.Sequence[modal.mount.Mount]: ...
|
361
|
+
def _assert_no_mount_layers(self): ...
|
188
362
|
@staticmethod
|
189
|
-
def _from_args(
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
363
|
+
def _from_args(
|
364
|
+
*,
|
365
|
+
base_images: typing.Optional[dict[str, Image]] = None,
|
366
|
+
dockerfile_function: typing.Optional[
|
367
|
+
typing.Callable[[typing.Literal["2023.12", "2024.04", "2024.10"]], DockerfileSpec]
|
368
|
+
] = None,
|
369
|
+
secrets: typing.Optional[collections.abc.Sequence[modal.secret.Secret]] = None,
|
370
|
+
gpu_config: typing.Optional[modal_proto.api_pb2.GPUConfig] = None,
|
371
|
+
build_function: typing.Optional[modal.functions.Function] = None,
|
372
|
+
build_function_input: typing.Optional[modal_proto.api_pb2.FunctionInput] = None,
|
373
|
+
image_registry_config: typing.Optional[_ImageRegistryConfig] = None,
|
374
|
+
context_mount_function: typing.Optional[typing.Callable[[], typing.Optional[modal.mount.Mount]]] = None,
|
375
|
+
force_build: bool = False,
|
376
|
+
_namespace: int = 1,
|
377
|
+
_do_assert_no_mount_layers: bool = True,
|
378
|
+
): ...
|
379
|
+
def copy_mount(self, mount: modal.mount.Mount, remote_path: typing.Union[str, pathlib.Path] = ".") -> Image: ...
|
380
|
+
def add_local_file(
|
381
|
+
self, local_path: typing.Union[str, pathlib.Path], remote_path: str, *, copy: bool = False
|
382
|
+
) -> Image: ...
|
383
|
+
def add_local_dir(
|
384
|
+
self,
|
385
|
+
local_path: typing.Union[str, pathlib.Path],
|
386
|
+
remote_path: str,
|
387
|
+
*,
|
388
|
+
copy: bool = False,
|
389
|
+
ignore: typing.Union[collections.abc.Sequence[str], typing.Callable[[pathlib.Path], bool]] = [],
|
390
|
+
) -> Image: ...
|
391
|
+
def copy_local_file(
|
392
|
+
self, local_path: typing.Union[str, pathlib.Path], remote_path: typing.Union[str, pathlib.Path] = "./"
|
393
|
+
) -> Image: ...
|
394
|
+
def add_local_python_source(
|
395
|
+
self,
|
396
|
+
*module_names: str,
|
397
|
+
copy: bool = False,
|
398
|
+
ignore: typing.Union[
|
399
|
+
collections.abc.Sequence[str], typing.Callable[[pathlib.Path], bool]
|
400
|
+
] = modal.file_pattern_matcher.NON_PYTHON_FILES,
|
401
|
+
) -> Image: ...
|
402
|
+
def copy_local_dir(
|
403
|
+
self,
|
404
|
+
local_path: typing.Union[str, pathlib.Path],
|
405
|
+
remote_path: typing.Union[str, pathlib.Path] = ".",
|
406
|
+
ignore: typing.Union[collections.abc.Sequence[str], typing.Callable[[pathlib.Path], bool]] = [],
|
407
|
+
) -> Image: ...
|
408
|
+
|
409
|
+
class __from_id_spec(typing_extensions.Protocol):
|
410
|
+
def __call__(self, image_id: str, client: typing.Optional[modal.client.Client] = None) -> Image: ...
|
411
|
+
async def aio(self, image_id: str, client: typing.Optional[modal.client.Client] = None) -> Image: ...
|
412
|
+
|
413
|
+
from_id: __from_id_spec
|
414
|
+
|
415
|
+
def pip_install(
|
416
|
+
self,
|
417
|
+
*packages: typing.Union[str, list[str]],
|
418
|
+
find_links: typing.Optional[str] = None,
|
419
|
+
index_url: typing.Optional[str] = None,
|
420
|
+
extra_index_url: typing.Optional[str] = None,
|
421
|
+
pre: bool = False,
|
422
|
+
extra_options: str = "",
|
423
|
+
force_build: bool = False,
|
424
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = [],
|
425
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
426
|
+
) -> Image: ...
|
427
|
+
def pip_install_private_repos(
|
428
|
+
self,
|
429
|
+
*repositories: str,
|
430
|
+
git_user: str,
|
431
|
+
find_links: typing.Optional[str] = None,
|
432
|
+
index_url: typing.Optional[str] = None,
|
433
|
+
extra_index_url: typing.Optional[str] = None,
|
434
|
+
pre: bool = False,
|
435
|
+
extra_options: str = "",
|
436
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
437
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = [],
|
438
|
+
force_build: bool = False,
|
439
|
+
) -> Image: ...
|
440
|
+
def pip_install_from_requirements(
|
441
|
+
self,
|
442
|
+
requirements_txt: str,
|
443
|
+
find_links: typing.Optional[str] = None,
|
444
|
+
*,
|
445
|
+
index_url: typing.Optional[str] = None,
|
446
|
+
extra_index_url: typing.Optional[str] = None,
|
447
|
+
pre: bool = False,
|
448
|
+
extra_options: str = "",
|
449
|
+
force_build: bool = False,
|
450
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = [],
|
451
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
452
|
+
) -> Image: ...
|
453
|
+
def pip_install_from_pyproject(
|
454
|
+
self,
|
455
|
+
pyproject_toml: str,
|
456
|
+
optional_dependencies: list[str] = [],
|
457
|
+
*,
|
458
|
+
find_links: typing.Optional[str] = None,
|
459
|
+
index_url: typing.Optional[str] = None,
|
460
|
+
extra_index_url: typing.Optional[str] = None,
|
461
|
+
pre: bool = False,
|
462
|
+
extra_options: str = "",
|
463
|
+
force_build: bool = False,
|
464
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = [],
|
465
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
466
|
+
) -> Image: ...
|
467
|
+
def poetry_install_from_file(
|
468
|
+
self,
|
469
|
+
poetry_pyproject_toml: str,
|
470
|
+
poetry_lockfile: typing.Optional[str] = None,
|
471
|
+
ignore_lockfile: bool = False,
|
472
|
+
old_installer: bool = False,
|
473
|
+
force_build: bool = False,
|
474
|
+
with_: list[str] = [],
|
475
|
+
without: list[str] = [],
|
476
|
+
only: list[str] = [],
|
477
|
+
*,
|
478
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = [],
|
479
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
480
|
+
) -> Image: ...
|
481
|
+
def dockerfile_commands(
|
482
|
+
self,
|
483
|
+
*dockerfile_commands: typing.Union[str, list[str]],
|
484
|
+
context_files: dict[str, str] = {},
|
485
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = [],
|
486
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
487
|
+
context_mount: typing.Optional[modal.mount.Mount] = None,
|
488
|
+
force_build: bool = False,
|
489
|
+
ignore: typing.Union[
|
490
|
+
collections.abc.Sequence[str], typing.Callable[[pathlib.Path], bool]
|
491
|
+
] = modal.image.AUTO_DOCKERIGNORE,
|
492
|
+
) -> Image: ...
|
493
|
+
def entrypoint(self, entrypoint_commands: list[str]) -> Image: ...
|
494
|
+
def shell(self, shell_commands: list[str]) -> Image: ...
|
495
|
+
def run_commands(
|
496
|
+
self,
|
497
|
+
*commands: typing.Union[str, list[str]],
|
498
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = [],
|
499
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
500
|
+
force_build: bool = False,
|
501
|
+
) -> Image: ...
|
225
502
|
@staticmethod
|
226
|
-
def conda(python_version: typing.
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
503
|
+
def conda(python_version: typing.Optional[str] = None, force_build: bool = False): ...
|
504
|
+
def conda_install(
|
505
|
+
self,
|
506
|
+
*packages: typing.Union[str, list[str]],
|
507
|
+
channels: list[str] = [],
|
508
|
+
force_build: bool = False,
|
509
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = [],
|
510
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
511
|
+
): ...
|
512
|
+
def conda_update_from_environment(
|
513
|
+
self,
|
514
|
+
environment_yml: str,
|
515
|
+
force_build: bool = False,
|
516
|
+
*,
|
517
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = [],
|
518
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
519
|
+
): ...
|
235
520
|
@staticmethod
|
236
|
-
def micromamba(python_version: typing.
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
521
|
+
def micromamba(python_version: typing.Optional[str] = None, force_build: bool = False) -> Image: ...
|
522
|
+
def micromamba_install(
|
523
|
+
self,
|
524
|
+
*packages: typing.Union[str, list[str]],
|
525
|
+
spec_file: typing.Optional[str] = None,
|
526
|
+
channels: list[str] = [],
|
527
|
+
force_build: bool = False,
|
528
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = [],
|
529
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
530
|
+
) -> Image: ...
|
242
531
|
@staticmethod
|
243
|
-
def _registry_setup_commands(
|
244
|
-
|
245
|
-
|
532
|
+
def _registry_setup_commands(
|
533
|
+
tag: str,
|
534
|
+
builder_version: typing.Literal["2023.12", "2024.04", "2024.10"],
|
535
|
+
setup_commands: list[str],
|
536
|
+
add_python: typing.Optional[str] = None,
|
537
|
+
) -> list[str]: ...
|
246
538
|
@staticmethod
|
247
|
-
def from_registry(
|
248
|
-
|
249
|
-
|
539
|
+
def from_registry(
|
540
|
+
tag: str,
|
541
|
+
*,
|
542
|
+
secret: typing.Optional[modal.secret.Secret] = None,
|
543
|
+
setup_dockerfile_commands: list[str] = [],
|
544
|
+
force_build: bool = False,
|
545
|
+
add_python: typing.Optional[str] = None,
|
546
|
+
**kwargs,
|
547
|
+
) -> Image: ...
|
250
548
|
@staticmethod
|
251
|
-
def from_gcp_artifact_registry(
|
252
|
-
|
253
|
-
|
549
|
+
def from_gcp_artifact_registry(
|
550
|
+
tag: str,
|
551
|
+
secret: typing.Optional[modal.secret.Secret] = None,
|
552
|
+
*,
|
553
|
+
setup_dockerfile_commands: list[str] = [],
|
554
|
+
force_build: bool = False,
|
555
|
+
add_python: typing.Optional[str] = None,
|
556
|
+
**kwargs,
|
557
|
+
) -> Image: ...
|
254
558
|
@staticmethod
|
255
|
-
def from_aws_ecr(
|
256
|
-
|
257
|
-
|
559
|
+
def from_aws_ecr(
|
560
|
+
tag: str,
|
561
|
+
secret: typing.Optional[modal.secret.Secret] = None,
|
562
|
+
*,
|
563
|
+
setup_dockerfile_commands: list[str] = [],
|
564
|
+
force_build: bool = False,
|
565
|
+
add_python: typing.Optional[str] = None,
|
566
|
+
**kwargs,
|
567
|
+
) -> Image: ...
|
258
568
|
@staticmethod
|
259
|
-
def from_dockerfile(
|
260
|
-
|
261
|
-
|
569
|
+
def from_dockerfile(
|
570
|
+
path: typing.Union[str, pathlib.Path],
|
571
|
+
context_mount: typing.Optional[modal.mount.Mount] = None,
|
572
|
+
force_build: bool = False,
|
573
|
+
*,
|
574
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = [],
|
575
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
576
|
+
add_python: typing.Optional[str] = None,
|
577
|
+
ignore: typing.Union[
|
578
|
+
collections.abc.Sequence[str], typing.Callable[[pathlib.Path], bool]
|
579
|
+
] = modal.image.AUTO_DOCKERIGNORE,
|
580
|
+
) -> Image: ...
|
262
581
|
@staticmethod
|
263
|
-
def debian_slim(python_version: typing.
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
582
|
+
def debian_slim(python_version: typing.Optional[str] = None, force_build: bool = False) -> Image: ...
|
583
|
+
def apt_install(
|
584
|
+
self,
|
585
|
+
*packages: typing.Union[str, list[str]],
|
586
|
+
force_build: bool = False,
|
587
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = [],
|
588
|
+
gpu: typing.Union[None, bool, str, modal.gpu._GPUConfig] = None,
|
589
|
+
) -> Image: ...
|
590
|
+
def run_function(
|
591
|
+
self,
|
592
|
+
raw_f: typing.Callable[..., typing.Any],
|
593
|
+
secrets: collections.abc.Sequence[modal.secret.Secret] = (),
|
594
|
+
gpu: typing.Union[
|
595
|
+
None, bool, str, modal.gpu._GPUConfig, list[typing.Union[None, bool, str, modal.gpu._GPUConfig]]
|
596
|
+
] = None,
|
597
|
+
mounts: collections.abc.Sequence[modal.mount.Mount] = (),
|
598
|
+
volumes: dict[
|
599
|
+
typing.Union[str, pathlib.PurePosixPath],
|
600
|
+
typing.Union[modal.volume.Volume, modal.cloud_bucket_mount.CloudBucketMount],
|
601
|
+
] = {},
|
602
|
+
network_file_systems: dict[
|
603
|
+
typing.Union[str, pathlib.PurePosixPath], modal.network_file_system.NetworkFileSystem
|
604
|
+
] = {},
|
605
|
+
cpu: typing.Optional[float] = None,
|
606
|
+
memory: typing.Optional[int] = None,
|
607
|
+
timeout: typing.Optional[int] = 3600,
|
608
|
+
force_build: bool = False,
|
609
|
+
cloud: typing.Optional[str] = None,
|
610
|
+
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
611
|
+
args: collections.abc.Sequence[typing.Any] = (),
|
612
|
+
kwargs: dict[str, typing.Any] = {},
|
613
|
+
) -> Image: ...
|
614
|
+
def env(self, vars: dict[str, str]) -> Image: ...
|
615
|
+
def workdir(self, path: typing.Union[str, pathlib.PurePosixPath]) -> Image: ...
|
616
|
+
def imports(self): ...
|
617
|
+
|
618
|
+
class ___logs_spec(typing_extensions.Protocol):
|
619
|
+
def __call__(self) -> typing.Generator[str, None, None]: ...
|
620
|
+
def aio(self) -> typing.AsyncGenerator[str, None]: ...
|
621
|
+
|
622
|
+
_logs: ___logs_spec
|
623
|
+
|
624
|
+
SUPPORTED_PYTHON_SERIES: dict[typing.Literal["2023.12", "2024.04", "2024.10"], list[str]]
|