Skip to content

Commit 040f3b2

Browse files
committed
Removed /scratch form volumes, mounting the assets directly to preview path
1 parent 3e5daaf commit 040f3b2

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ services:
2323
- /work:/work:ro
2424
- /pool/data:/pool/data:ro
2525
- /container/da/climateclaw-links/${CLIMATECLAW_INSTANCE_NAME}/logs:/app/logs
26-
- ${CLIMATECLAW_CACHE_PATH}:/app/cache:rw
2726
networks:
2827
- climateclaw
2928
healthcheck:
@@ -52,7 +51,6 @@ services:
5251
- /work:/work:ro
5352
- /pool/data:/pool/data:ro
5453
- /container/da/climateclaw-links/${CLIMATECLAW_INSTANCE_NAME}/logs:/app/logs
55-
- ${CLIMATECLAW_CACHE_PATH}:/app/cache:rw
5654
cpus: 4
5755
networks:
5856
- climateclaw

docker/code-server/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ RUN conda run -n env uv pip install \
2222
EXPOSE ${CLIMATECLAW_MCP_PORT:-8051}
2323

2424
COPY src /app/src
25+
RUN mkdir -p /app/cache
2526

2627
# Launch CI server
2728
CMD uvicorn climateclaw.tools.code.server:app \

gen_compose.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,10 @@ def expand_service(name, service, replicas, preview_paths=None):
9292
]
9393

9494
s["hostname"] = replica_name + "-${CLIMATECLAW_INSTANCE_NAME}"
95-
if preview_paths and i == 1:
95+
if preview_paths:
9696
volumes = s.get("volumes", [])
9797
volumes.extend(
98-
f"{preview_path}:${{CLIMATECLAW_CACHE_PATH}}"
99-
for preview_path in preview_paths
98+
f"{preview_path}:/app/cache:rw" for preview_path in preview_paths
10099
)
101100
s["volumes"] = volumes
102101

@@ -302,11 +301,13 @@ def main():
302301

303302
for name, svc in services.items():
304303
if name == "climateclaw":
305-
new_services.update(expand_service(name, svc, backend_n, preview_paths))
304+
new_services.update(expand_service(name, svc, backend_n))
306305
elif name == "litellm":
307306
new_services.update(expand_service(name, svc, litellm_n))
308307
elif name in MCP_SERVICES:
309-
if name in available_mcp_servers:
308+
if name == "code-server":
309+
new_services.update(expand_service(name, svc, backend_n, preview_paths))
310+
elif name in available_mcp_servers:
310311
new_services.update(expand_service(name, svc, mcp_replica_n[name]))
311312
elif name == "freva-web":
312313
svc.get("environment").remove("CHAT_BOT_URL=http://climateclaw:8502")

src/climateclaw/tools/code/server.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ async def code_interpreter(code: str) -> dict:
120120
Returns a structured dict with all outputs (stdout, stderr, result_rep, display_data, error)
121121
"""
122122
working_dir = get_cwd() or os.getcwd()
123+
os.makedirs(working_dir, exist_ok=True)
124+
123125
session_id, request_id = current_ids()
124126

125127
logger.debug(

0 commit comments

Comments
 (0)