Skip to content

Commit

Permalink
docker init for faster shutdown (#257)
Browse files Browse the repository at this point in the history
* use init to speed shutdown

this enables containers to correctly receive exit signals and exit immediately.

* update changelog

---------

Co-authored-by: aisi-inspect <[email protected]>
  • Loading branch information
jjallaire-aisi and aisi-inspect authored Aug 20, 2024
1 parent 7c0ffba commit 8a0ede5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- Specify `init` value in default Docker compose file so that exit signals are handled correctly (substantially improves container shutdown performance).

## v0.3.24 (18 August 2024)

- Support for tool calling for Llama 3.1 models on Bedrock.
Expand Down
2 changes: 2 additions & 0 deletions src/inspect_ai/util/_sandbox/docker/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def safe_cleanup_auto_compose(file: str | None) -> None:
default:
image: "python:3.12-bookworm"
command: "tail -f /dev/null"
init: true
network_mode: none
stop_grace_period: 1s
"""
Expand All @@ -84,6 +85,7 @@ def safe_cleanup_auto_compose(file: str | None) -> None:
build:
context: "."
command: "tail -f /dev/null"
init: true
network_mode: none
stop_grace_period: 1s
"""
Expand Down

0 comments on commit 8a0ede5

Please sign in to comment.