Local scratch dir for staging `docker cp` transfers. Defaults to the system temp dir. Override with CODECLASH_TMPDIR (e.g. on AWS Batch, where the default temp dir misbehaves).
()
| 12 | |
| 13 | |
| 14 | def _scratch_dir() -> str | None: |
| 15 | """Local scratch dir for staging `docker cp` transfers. Defaults to the system temp dir. |
| 16 | Override with CODECLASH_TMPDIR (e.g. on AWS Batch, where the default temp dir misbehaves).""" |
| 17 | override = os.getenv("CODECLASH_TMPDIR") |
| 18 | if override: |
| 19 | Path(override).mkdir(parents=True, exist_ok=True) |
| 20 | return override |
| 21 | |
| 22 | |
| 23 | class ClashDockerEnvironment(DockerEnvironment): |
no outgoing calls
no test coverage detected