modal 1.1.1.dev30__tar.gz → 1.1.1.dev32__tar.gz
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 modal might be problematic. Click here for more details.
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/PKG-INFO +1 -1
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/client.pyi +2 -2
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/image.py +4 -2
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/image.pyi +8 -4
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/sandbox.py +16 -16
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/sandbox.pyi +15 -15
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal.egg-info/PKG-INFO +1 -1
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_proto/api.proto +25 -9
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_proto/api_pb2.py +700 -690
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_proto/api_pb2.pyi +85 -13
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_version/__init__.py +1 -1
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/LICENSE +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/README.md +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/__init__.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/__main__.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_clustered_functions.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_clustered_functions.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_container_entrypoint.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_functions.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_ipython.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_location.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_object.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_output.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_partial_function.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_pty.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_resolver.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_resources.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_runtime/__init__.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_runtime/asgi.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_runtime/container_io_manager.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_runtime/container_io_manager.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_runtime/execution_context.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_runtime/execution_context.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_runtime/gpu_memory_snapshot.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_runtime/telemetry.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_runtime/user_code_imports.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_serialization.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_traceback.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_tunnel.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_tunnel.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_type_manager.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/__init__.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/app_utils.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/async_utils.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/auth_token_manager.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/blob_utils.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/bytes_io_segment_payload.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/deprecation.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/docker_utils.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/function_utils.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/git_utils.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/grpc_testing.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/grpc_utils.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/hash_utils.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/http_utils.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/jwt_utils.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/logger.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/mount_utils.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/name_utils.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/package_utils.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/pattern_utils.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/rand_pb_testing.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/shell_utils.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_utils/time_utils.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_vendor/__init__.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_vendor/a2wsgi_wsgi.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_vendor/cloudpickle.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_vendor/tblib.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/_watcher.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/app.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/app.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/builder/2023.12.312.txt +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/builder/2023.12.txt +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/builder/2024.04.txt +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/builder/2024.10.txt +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/builder/2025.06.txt +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/builder/PREVIEW.txt +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/builder/README.md +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/builder/base-images.json +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/call_graph.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/__init__.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/_download.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/_traceback.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/app.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/cluster.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/config.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/container.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/dict.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/entry_point.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/environment.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/import_refs.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/launch.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/network_file_system.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/profile.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/programs/__init__.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/programs/run_jupyter.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/programs/vscode.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/queues.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/run.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/secret.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/token.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/utils.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cli/volume.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/client.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cloud_bucket_mount.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cloud_bucket_mount.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cls.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/cls.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/config.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/container_process.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/container_process.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/dict.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/dict.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/environments.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/environments.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/exception.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/experimental/__init__.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/experimental/flash.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/experimental/flash.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/experimental/ipython.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/file_io.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/file_io.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/file_pattern_matcher.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/functions.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/functions.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/gpu.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/io_streams.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/io_streams.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/mount.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/mount.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/network_file_system.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/network_file_system.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/object.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/object.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/output.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/parallel_map.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/parallel_map.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/partial_function.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/partial_function.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/proxy.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/proxy.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/py.typed +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/queue.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/queue.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/retries.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/runner.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/runner.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/running_app.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/schedule.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/scheduler_placement.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/secret.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/secret.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/serving.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/serving.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/snapshot.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/snapshot.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/stream_type.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/token_flow.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/token_flow.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/volume.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal/volume.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal.egg-info/SOURCES.txt +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal.egg-info/dependency_links.txt +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal.egg-info/entry_points.txt +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal.egg-info/requires.txt +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal.egg-info/top_level.txt +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_docs/__init__.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_docs/gen_cli_docs.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_docs/gen_reference_docs.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_docs/mdmd/__init__.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_docs/mdmd/mdmd.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_docs/mdmd/signatures.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_proto/__init__.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_proto/api_grpc.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_proto/api_pb2_grpc.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_proto/api_pb2_grpc.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_proto/modal_api_grpc.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_proto/modal_options_grpc.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_proto/options.proto +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_proto/options_grpc.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_proto/options_pb2.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_proto/options_pb2.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_proto/options_pb2_grpc.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_proto/options_pb2_grpc.pyi +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_proto/py.typed +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/modal_version/__main__.py +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/pyproject.toml +0 -0
- {modal-1.1.1.dev30 → modal-1.1.1.dev32}/setup.cfg +0 -0
|
@@ -33,7 +33,7 @@ class _Client:
|
|
|
33
33
|
server_url: str,
|
|
34
34
|
client_type: int,
|
|
35
35
|
credentials: typing.Optional[tuple[str, str]],
|
|
36
|
-
version: str = "1.1.1.
|
|
36
|
+
version: str = "1.1.1.dev32",
|
|
37
37
|
):
|
|
38
38
|
"""mdmd:hidden
|
|
39
39
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -164,7 +164,7 @@ class Client:
|
|
|
164
164
|
server_url: str,
|
|
165
165
|
client_type: int,
|
|
166
166
|
credentials: typing.Optional[tuple[str, str]],
|
|
167
|
-
version: str = "1.1.1.
|
|
167
|
+
version: str = "1.1.1.dev32",
|
|
168
168
|
):
|
|
169
169
|
"""mdmd:hidden
|
|
170
170
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -1561,7 +1561,7 @@ class _Image(_Object, type_prefix="im"):
|
|
|
1561
1561
|
self,
|
|
1562
1562
|
entrypoint_commands: list[str],
|
|
1563
1563
|
) -> "_Image":
|
|
1564
|
-
"""Set the
|
|
1564
|
+
"""Set the ENTRYPOINT for the image."""
|
|
1565
1565
|
if not isinstance(entrypoint_commands, list) or not all(isinstance(x, str) for x in entrypoint_commands):
|
|
1566
1566
|
raise InvalidError("entrypoint_commands must be a list of strings.")
|
|
1567
1567
|
args_str = _flatten_str_args("entrypoint", "entrypoint_commands", entrypoint_commands)
|
|
@@ -2237,7 +2237,9 @@ class _Image(_Object, type_prefix="im"):
|
|
|
2237
2237
|
)
|
|
2238
2238
|
|
|
2239
2239
|
def cmd(self, cmd: list[str]) -> "_Image":
|
|
2240
|
-
"""Set the default
|
|
2240
|
+
"""Set the default command (`CMD`) to run when a container is started.
|
|
2241
|
+
|
|
2242
|
+
Used with `modal.Sandbox`. Has no effect on `modal.Function`.
|
|
2241
2243
|
|
|
2242
2244
|
**Example**
|
|
2243
2245
|
|
|
@@ -584,7 +584,7 @@ class _Image(modal._object._Object):
|
|
|
584
584
|
...
|
|
585
585
|
|
|
586
586
|
def entrypoint(self, entrypoint_commands: list[str]) -> _Image:
|
|
587
|
-
"""Set the
|
|
587
|
+
"""Set the ENTRYPOINT for the image."""
|
|
588
588
|
...
|
|
589
589
|
|
|
590
590
|
def shell(self, shell_commands: list[str]) -> _Image:
|
|
@@ -912,7 +912,9 @@ class _Image(modal._object._Object):
|
|
|
912
912
|
...
|
|
913
913
|
|
|
914
914
|
def cmd(self, cmd: list[str]) -> _Image:
|
|
915
|
-
"""Set the default
|
|
915
|
+
"""Set the default command (`CMD`) to run when a container is started.
|
|
916
|
+
|
|
917
|
+
Used with `modal.Sandbox`. Has no effect on `modal.Function`.
|
|
916
918
|
|
|
917
919
|
**Example**
|
|
918
920
|
|
|
@@ -1424,7 +1426,7 @@ class Image(modal.object.Object):
|
|
|
1424
1426
|
...
|
|
1425
1427
|
|
|
1426
1428
|
def entrypoint(self, entrypoint_commands: list[str]) -> Image:
|
|
1427
|
-
"""Set the
|
|
1429
|
+
"""Set the ENTRYPOINT for the image."""
|
|
1428
1430
|
...
|
|
1429
1431
|
|
|
1430
1432
|
def shell(self, shell_commands: list[str]) -> Image:
|
|
@@ -1752,7 +1754,9 @@ class Image(modal.object.Object):
|
|
|
1752
1754
|
...
|
|
1753
1755
|
|
|
1754
1756
|
def cmd(self, cmd: list[str]) -> Image:
|
|
1755
|
-
"""Set the default
|
|
1757
|
+
"""Set the default command (`CMD`) to run when a container is started.
|
|
1758
|
+
|
|
1759
|
+
Used with `modal.Sandbox`. Has no effect on `modal.Function`.
|
|
1756
1760
|
|
|
1757
1761
|
**Example**
|
|
1758
1762
|
|
|
@@ -60,15 +60,15 @@ if TYPE_CHECKING:
|
|
|
60
60
|
import modal.app
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
def _validate_exec_args(
|
|
63
|
+
def _validate_exec_args(args: Sequence[str]) -> None:
|
|
64
64
|
# Entrypoint args must be strings.
|
|
65
|
-
if not all(isinstance(arg, str) for arg in
|
|
65
|
+
if not all(isinstance(arg, str) for arg in args):
|
|
66
66
|
raise InvalidError("All entrypoint arguments must be strings")
|
|
67
67
|
# Avoid "[Errno 7] Argument list too long" errors.
|
|
68
|
-
total_arg_len = sum(len(arg) for arg in
|
|
68
|
+
total_arg_len = sum(len(arg) for arg in args)
|
|
69
69
|
if total_arg_len > ARG_MAX_BYTES:
|
|
70
70
|
raise InvalidError(
|
|
71
|
-
f"Total length of
|
|
71
|
+
f"Total length of CMD arguments must be less than {ARG_MAX_BYTES} bytes (ARG_MAX). "
|
|
72
72
|
f"Got {total_arg_len} bytes."
|
|
73
73
|
)
|
|
74
74
|
|
|
@@ -104,7 +104,7 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
104
104
|
|
|
105
105
|
@staticmethod
|
|
106
106
|
def _new(
|
|
107
|
-
|
|
107
|
+
args: Sequence[str],
|
|
108
108
|
image: _Image,
|
|
109
109
|
secrets: Sequence[_Secret],
|
|
110
110
|
name: Optional[str] = None,
|
|
@@ -208,7 +208,7 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
208
208
|
|
|
209
209
|
ephemeral_disk = None # Ephemeral disk requests not supported on Sandboxes.
|
|
210
210
|
definition = api_pb2.Sandbox(
|
|
211
|
-
entrypoint_args=
|
|
211
|
+
entrypoint_args=args,
|
|
212
212
|
image_id=image.object_id,
|
|
213
213
|
mount_ids=[mount.object_id for mount in mounts] + [mount.object_id for mount in image._mount_layers],
|
|
214
214
|
secret_ids=[secret.object_id for secret in secrets],
|
|
@@ -250,7 +250,7 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
250
250
|
|
|
251
251
|
@staticmethod
|
|
252
252
|
async def create(
|
|
253
|
-
*
|
|
253
|
+
*args: str, # Set the CMD of the Sandbox, overriding any CMD of the container image.
|
|
254
254
|
# Associate the sandbox with an app. Required unless creating from a container.
|
|
255
255
|
app: Optional["modal.app._App"] = None,
|
|
256
256
|
name: Optional[str] = None, # Optionally give the sandbox a name. Unique within an app.
|
|
@@ -316,7 +316,7 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
316
316
|
)
|
|
317
317
|
|
|
318
318
|
return await _Sandbox._create(
|
|
319
|
-
*
|
|
319
|
+
*args,
|
|
320
320
|
app=app,
|
|
321
321
|
name=name,
|
|
322
322
|
image=image,
|
|
@@ -346,7 +346,7 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
346
346
|
|
|
347
347
|
@staticmethod
|
|
348
348
|
async def _create(
|
|
349
|
-
*
|
|
349
|
+
*args: str, # Set the CMD of the Sandbox, overriding any CMD of the container image.
|
|
350
350
|
# Associate the sandbox with an app. Required unless creating from a container.
|
|
351
351
|
app: Optional["modal.app._App"] = None,
|
|
352
352
|
name: Optional[str] = None, # Optionally give the sandbox a name. Unique within an app.
|
|
@@ -395,11 +395,11 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
395
395
|
# sandbox that runs the shell session
|
|
396
396
|
from .app import _App
|
|
397
397
|
|
|
398
|
-
_validate_exec_args(
|
|
398
|
+
_validate_exec_args(args)
|
|
399
399
|
|
|
400
400
|
# TODO(erikbern): Get rid of the `_new` method and create an already-hydrated object
|
|
401
401
|
obj = _Sandbox._new(
|
|
402
|
-
|
|
402
|
+
args,
|
|
403
403
|
image=image or _default_image,
|
|
404
404
|
secrets=secrets,
|
|
405
405
|
name=name,
|
|
@@ -648,7 +648,7 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
648
648
|
@overload
|
|
649
649
|
async def exec(
|
|
650
650
|
self,
|
|
651
|
-
*
|
|
651
|
+
*args: str,
|
|
652
652
|
pty_info: Optional[api_pb2.PTYInfo] = None,
|
|
653
653
|
stdout: StreamType = StreamType.PIPE,
|
|
654
654
|
stderr: StreamType = StreamType.PIPE,
|
|
@@ -663,7 +663,7 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
663
663
|
@overload
|
|
664
664
|
async def exec(
|
|
665
665
|
self,
|
|
666
|
-
*
|
|
666
|
+
*args: str,
|
|
667
667
|
pty_info: Optional[api_pb2.PTYInfo] = None,
|
|
668
668
|
stdout: StreamType = StreamType.PIPE,
|
|
669
669
|
stderr: StreamType = StreamType.PIPE,
|
|
@@ -677,7 +677,7 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
677
677
|
|
|
678
678
|
async def exec(
|
|
679
679
|
self,
|
|
680
|
-
*
|
|
680
|
+
*args: str,
|
|
681
681
|
pty_info: Optional[api_pb2.PTYInfo] = None, # Deprecated: internal use only
|
|
682
682
|
stdout: StreamType = StreamType.PIPE,
|
|
683
683
|
stderr: StreamType = StreamType.PIPE,
|
|
@@ -713,7 +713,7 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
713
713
|
|
|
714
714
|
if workdir is not None and not workdir.startswith("/"):
|
|
715
715
|
raise InvalidError(f"workdir must be an absolute path, got: {workdir}")
|
|
716
|
-
_validate_exec_args(
|
|
716
|
+
_validate_exec_args(args)
|
|
717
717
|
|
|
718
718
|
# Force secret resolution so we can pass the secret IDs to the backend.
|
|
719
719
|
secret_coros = [secret.hydrate(client=self._client) for secret in secrets]
|
|
@@ -722,7 +722,7 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
722
722
|
task_id = await self._get_task_id()
|
|
723
723
|
req = api_pb2.ContainerExecRequest(
|
|
724
724
|
task_id=task_id,
|
|
725
|
-
command=
|
|
725
|
+
command=args,
|
|
726
726
|
pty_info=_pty_info or pty_info,
|
|
727
727
|
runtime_debug=config.get("function_runtime_debug"),
|
|
728
728
|
timeout_secs=timeout or 0,
|
|
@@ -25,7 +25,7 @@ import os
|
|
|
25
25
|
import typing
|
|
26
26
|
import typing_extensions
|
|
27
27
|
|
|
28
|
-
def _validate_exec_args(
|
|
28
|
+
def _validate_exec_args(args: collections.abc.Sequence[str]) -> None: ...
|
|
29
29
|
|
|
30
30
|
class DefaultSandboxNameOverride(str):
|
|
31
31
|
"""A singleton class that represents the default sandbox name override.
|
|
@@ -55,7 +55,7 @@ class _Sandbox(modal._object._Object):
|
|
|
55
55
|
|
|
56
56
|
@staticmethod
|
|
57
57
|
def _new(
|
|
58
|
-
|
|
58
|
+
args: collections.abc.Sequence[str],
|
|
59
59
|
image: modal.image._Image,
|
|
60
60
|
secrets: collections.abc.Sequence[modal.secret._Secret],
|
|
61
61
|
name: typing.Optional[str] = None,
|
|
@@ -89,7 +89,7 @@ class _Sandbox(modal._object._Object):
|
|
|
89
89
|
|
|
90
90
|
@staticmethod
|
|
91
91
|
async def create(
|
|
92
|
-
*
|
|
92
|
+
*args: str,
|
|
93
93
|
app: typing.Optional[modal.app._App] = None,
|
|
94
94
|
name: typing.Optional[str] = None,
|
|
95
95
|
image: typing.Optional[modal.image._Image] = None,
|
|
@@ -136,7 +136,7 @@ class _Sandbox(modal._object._Object):
|
|
|
136
136
|
|
|
137
137
|
@staticmethod
|
|
138
138
|
async def _create(
|
|
139
|
-
*
|
|
139
|
+
*args: str,
|
|
140
140
|
app: typing.Optional[modal.app._App] = None,
|
|
141
141
|
name: typing.Optional[str] = None,
|
|
142
142
|
image: typing.Optional[modal.image._Image] = None,
|
|
@@ -244,7 +244,7 @@ class _Sandbox(modal._object._Object):
|
|
|
244
244
|
@typing.overload
|
|
245
245
|
async def exec(
|
|
246
246
|
self,
|
|
247
|
-
*
|
|
247
|
+
*args: str,
|
|
248
248
|
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
|
249
249
|
stdout: modal.stream_type.StreamType = modal.stream_type.StreamType.PIPE,
|
|
250
250
|
stderr: modal.stream_type.StreamType = modal.stream_type.StreamType.PIPE,
|
|
@@ -258,7 +258,7 @@ class _Sandbox(modal._object._Object):
|
|
|
258
258
|
@typing.overload
|
|
259
259
|
async def exec(
|
|
260
260
|
self,
|
|
261
|
-
*
|
|
261
|
+
*args: str,
|
|
262
262
|
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
|
263
263
|
stdout: modal.stream_type.StreamType = modal.stream_type.StreamType.PIPE,
|
|
264
264
|
stderr: modal.stream_type.StreamType = modal.stream_type.StreamType.PIPE,
|
|
@@ -364,7 +364,7 @@ class Sandbox(modal.object.Object):
|
|
|
364
364
|
|
|
365
365
|
@staticmethod
|
|
366
366
|
def _new(
|
|
367
|
-
|
|
367
|
+
args: collections.abc.Sequence[str],
|
|
368
368
|
image: modal.image.Image,
|
|
369
369
|
secrets: collections.abc.Sequence[modal.secret.Secret],
|
|
370
370
|
name: typing.Optional[str] = None,
|
|
@@ -399,7 +399,7 @@ class Sandbox(modal.object.Object):
|
|
|
399
399
|
def __call__(
|
|
400
400
|
self,
|
|
401
401
|
/,
|
|
402
|
-
*
|
|
402
|
+
*args: str,
|
|
403
403
|
app: typing.Optional[modal.app.App] = None,
|
|
404
404
|
name: typing.Optional[str] = None,
|
|
405
405
|
image: typing.Optional[modal.image.Image] = None,
|
|
@@ -449,7 +449,7 @@ class Sandbox(modal.object.Object):
|
|
|
449
449
|
async def aio(
|
|
450
450
|
self,
|
|
451
451
|
/,
|
|
452
|
-
*
|
|
452
|
+
*args: str,
|
|
453
453
|
app: typing.Optional[modal.app.App] = None,
|
|
454
454
|
name: typing.Optional[str] = None,
|
|
455
455
|
image: typing.Optional[modal.image.Image] = None,
|
|
@@ -502,7 +502,7 @@ class Sandbox(modal.object.Object):
|
|
|
502
502
|
def __call__(
|
|
503
503
|
self,
|
|
504
504
|
/,
|
|
505
|
-
*
|
|
505
|
+
*args: str,
|
|
506
506
|
app: typing.Optional[modal.app.App] = None,
|
|
507
507
|
name: typing.Optional[str] = None,
|
|
508
508
|
image: typing.Optional[modal.image.Image] = None,
|
|
@@ -538,7 +538,7 @@ class Sandbox(modal.object.Object):
|
|
|
538
538
|
async def aio(
|
|
539
539
|
self,
|
|
540
540
|
/,
|
|
541
|
-
*
|
|
541
|
+
*args: str,
|
|
542
542
|
app: typing.Optional[modal.app.App] = None,
|
|
543
543
|
name: typing.Optional[str] = None,
|
|
544
544
|
image: typing.Optional[modal.image.Image] = None,
|
|
@@ -758,7 +758,7 @@ class Sandbox(modal.object.Object):
|
|
|
758
758
|
def __call__(
|
|
759
759
|
self,
|
|
760
760
|
/,
|
|
761
|
-
*
|
|
761
|
+
*args: str,
|
|
762
762
|
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
|
763
763
|
stdout: modal.stream_type.StreamType = modal.stream_type.StreamType.PIPE,
|
|
764
764
|
stderr: modal.stream_type.StreamType = modal.stream_type.StreamType.PIPE,
|
|
@@ -773,7 +773,7 @@ class Sandbox(modal.object.Object):
|
|
|
773
773
|
def __call__(
|
|
774
774
|
self,
|
|
775
775
|
/,
|
|
776
|
-
*
|
|
776
|
+
*args: str,
|
|
777
777
|
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
|
778
778
|
stdout: modal.stream_type.StreamType = modal.stream_type.StreamType.PIPE,
|
|
779
779
|
stderr: modal.stream_type.StreamType = modal.stream_type.StreamType.PIPE,
|
|
@@ -788,7 +788,7 @@ class Sandbox(modal.object.Object):
|
|
|
788
788
|
async def aio(
|
|
789
789
|
self,
|
|
790
790
|
/,
|
|
791
|
-
*
|
|
791
|
+
*args: str,
|
|
792
792
|
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
|
793
793
|
stdout: modal.stream_type.StreamType = modal.stream_type.StreamType.PIPE,
|
|
794
794
|
stderr: modal.stream_type.StreamType = modal.stream_type.StreamType.PIPE,
|
|
@@ -803,7 +803,7 @@ class Sandbox(modal.object.Object):
|
|
|
803
803
|
async def aio(
|
|
804
804
|
self,
|
|
805
805
|
/,
|
|
806
|
-
*
|
|
806
|
+
*args: str,
|
|
807
807
|
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
|
808
808
|
stdout: modal.stream_type.StreamType = modal.stream_type.StreamType.PIPE,
|
|
809
809
|
stderr: modal.stream_type.StreamType = modal.stream_type.StreamType.PIPE,
|
|
@@ -1140,15 +1140,19 @@ message DictLenResponse {
|
|
|
1140
1140
|
|
|
1141
1141
|
message DictListRequest {
|
|
1142
1142
|
string environment_name = 1;
|
|
1143
|
+
ListPagination pagination = 2;
|
|
1143
1144
|
}
|
|
1144
1145
|
|
|
1145
1146
|
message DictListResponse {
|
|
1146
1147
|
message DictInfo {
|
|
1147
1148
|
string name = 1;
|
|
1148
|
-
double created_at = 2;
|
|
1149
|
+
double created_at = 2; // Superseded by metadata, used by clients up to 1.1.1
|
|
1150
|
+
string dict_id = 3;
|
|
1151
|
+
DictMetadata metadata = 4;
|
|
1149
1152
|
}
|
|
1150
1153
|
|
|
1151
1154
|
repeated DictInfo dicts = 1;
|
|
1155
|
+
string environment_name = 2;
|
|
1152
1156
|
}
|
|
1153
1157
|
|
|
1154
1158
|
message DictMetadata {
|
|
@@ -2093,6 +2097,11 @@ message InputInfo {
|
|
|
2093
2097
|
bool task_first_input = 7;
|
|
2094
2098
|
}
|
|
2095
2099
|
|
|
2100
|
+
message ListPagination {
|
|
2101
|
+
int32 max_objects = 1;
|
|
2102
|
+
double created_before = 2;
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2096
2105
|
message MapAwaitRequest {
|
|
2097
2106
|
string function_call_id = 1;
|
|
2098
2107
|
string last_entry_id = 2;
|
|
@@ -2441,19 +2450,22 @@ message QueueLenResponse {
|
|
|
2441
2450
|
|
|
2442
2451
|
message QueueListRequest {
|
|
2443
2452
|
string environment_name = 1;
|
|
2444
|
-
|
|
2445
|
-
|
|
2453
|
+
int32 total_size_limit = 2; // Limit on "number of partitions" reported, since checking them is costly
|
|
2454
|
+
ListPagination pagination = 3;
|
|
2446
2455
|
}
|
|
2447
2456
|
|
|
2448
2457
|
message QueueListResponse {
|
|
2449
2458
|
message QueueInfo {
|
|
2450
2459
|
string name = 1;
|
|
2451
|
-
double created_at = 2;
|
|
2460
|
+
double created_at = 2; // Superseded by metadata, used by clients up to 1.1.1
|
|
2452
2461
|
int32 num_partitions = 3;
|
|
2453
2462
|
int32 total_size = 4;
|
|
2463
|
+
string queue_id = 5;
|
|
2464
|
+
QueueMetadata metadata = 6;
|
|
2454
2465
|
}
|
|
2455
2466
|
|
|
2456
2467
|
repeated QueueInfo queues = 1;
|
|
2468
|
+
string environment_name = 2;
|
|
2457
2469
|
}
|
|
2458
2470
|
|
|
2459
2471
|
message QueueMetadata {
|
|
@@ -2861,19 +2873,21 @@ message SecretGetOrCreateResponse {
|
|
|
2861
2873
|
|
|
2862
2874
|
message SecretListItem {
|
|
2863
2875
|
string label = 1;
|
|
2864
|
-
double created_at = 2;
|
|
2876
|
+
double created_at = 2; // Superseded by metadata, used by clients up to 1.1.1
|
|
2865
2877
|
double last_used_at = 3;
|
|
2866
|
-
string environment_name = 4;
|
|
2878
|
+
string environment_name = 4; // Unused by client
|
|
2867
2879
|
string secret_id = 5;
|
|
2880
|
+
SecretMetadata metadata = 6;
|
|
2868
2881
|
}
|
|
2869
2882
|
|
|
2870
2883
|
message SecretListRequest {
|
|
2871
|
-
string environment_name = 1;
|
|
2884
|
+
string environment_name = 1;
|
|
2885
|
+
ListPagination pagination = 2;
|
|
2872
2886
|
}
|
|
2873
2887
|
|
|
2874
2888
|
message SecretListResponse {
|
|
2875
2889
|
repeated SecretListItem items = 1;
|
|
2876
|
-
string environment_name = 2;
|
|
2890
|
+
string environment_name = 2;
|
|
2877
2891
|
}
|
|
2878
2892
|
|
|
2879
2893
|
message SecretMetadata {
|
|
@@ -3225,11 +3239,13 @@ message VolumeListFilesResponse {
|
|
|
3225
3239
|
message VolumeListItem {
|
|
3226
3240
|
string label = 1; // app name of object entity app
|
|
3227
3241
|
string volume_id = 2;
|
|
3228
|
-
double created_at = 3;
|
|
3242
|
+
double created_at = 3; // Superseded by metadata, used by clients up to 1.1.1
|
|
3243
|
+
VolumeMetadata metadata = 4;
|
|
3229
3244
|
}
|
|
3230
3245
|
|
|
3231
3246
|
message VolumeListRequest {
|
|
3232
3247
|
string environment_name = 1;
|
|
3248
|
+
ListPagination pagination = 2;
|
|
3233
3249
|
}
|
|
3234
3250
|
|
|
3235
3251
|
message VolumeListResponse {
|