MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / _scratch_dir

Function _scratch_dir

codeclash/utils/environment.py:14–20  ·  view source on GitHub ↗

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).

()

Source from the content-addressed store, hash-verified

12
13
14def _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
23class ClashDockerEnvironment(DockerEnvironment):

Callers 2

copy_between_containersFunction · 0.85
create_file_in_containerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected