Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions 13_sandboxes/anthropic_computer_use.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ def is_server_up(url):
# Note: The sandbox logs may mention `localhost:8080`.
# Ignore this and use the printed tunnel URLs instead.

# After you are done calling methods on the `sandbox` object, we recommend calling `detach` to disconnect
# your local `sandbox` object and clean up any client-side resources.
sandbox.detach()

# When finished, you can terminate the sandbox from your [Modal dashboard](https://modal.com/containers)
# or by running `Sandbox.from_id(sandbox.object_id).terminate()`.
# The Sandbox will also spin down after one hour.
4 changes: 0 additions & 4 deletions 13_sandboxes/jupyter_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,5 @@ def is_jupyter_up():

# You can now open this URL in your browser to access the Jupyter notebook!

# After you are done calling methods on the `sandbox` object, we recommend calling `detach` to disconnect
# your local `sandbox` object and clean up any client-side resources.
sandbox.detach()

# When you're done, terminate the sandbox using your [Modal dashboard](https://modal.com/sandboxes)
# or by running `Sandbox.from_id(sandbox.object_id).terminate()`.
4 changes: 0 additions & 4 deletions 13_sandboxes/opencode_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,6 @@ def main(
sandbox = create_sandbox(image, timeout, app, sandbox_secrets, "/root/code")
print_access_info(sandbox, password_secret_name)

# After you are done calling methods on the `sandbox` object, we recommend calling `detach` to disconnect
# your local `sandbox` object and clean up any client-side resources.
sandbox.detach()


# ## Command-line options

Expand Down
4 changes: 0 additions & 4 deletions 13_sandboxes/safe_code_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,3 @@
# Let's terminate the Sandbox to clean up after ourselves.

sandbox.terminate()

# After you are done calling methods on the `sandbox` object, we recommend calling `detach` to disconnect
# your local `sandbox` object and clean up any client-side resources.
sandbox.detach()
4 changes: 0 additions & 4 deletions 13_sandboxes/sandbox_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,3 @@
stderr = claude_ps.stderr.read()
if stderr != "":
print("Agent stderr:", stderr)

# After you are done calling methods on the `sandbox` object, we recommend calling `detach` to disconnect
# your local `sandbox` object and clean up any client-side resources.
sandbox.detach()
4 changes: 0 additions & 4 deletions 13_sandboxes/simple_code_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,3 @@ def run_code(writer: modal.io_streams.StreamWriter, reader: Iterator[str], code:
# Finally, let's clean up after ourselves and terminate the Sandbox.

sb.terminate()

# After you are done calling methods on the `sb` object, we recommend calling `detach` to disconnect
# your local `sandbox` object and clean up any client-side resources.
sb.detach()
Loading