Skip to content

Commit

Permalink
Use posix paths for Docker exec (#684)
Browse files Browse the repository at this point in the history
* Use posix paths for Docker exec

* Update CHANGELOG.md

---------

Co-authored-by: jjallaire <[email protected]>
  • Loading branch information
dragonstyle and jjallaire authored Oct 10, 2024
1 parent 6a0d180 commit c1be973
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Fix memory leak in Inspect View worker-based JSON parsing.
- Add `fail_on_error` option for `eval_retry()` and `inspect eval-retry`.
- Defer resolving helper models in `self_critique()` and `model_graded_qa()`.
- Fix Docker relative path resolution on Windows (use PurePosixPath not Path)

## v0.3.40 (6 October 2024)

Expand Down
4 changes: 2 additions & 2 deletions src/inspect_ai/util/_sandbox/docker/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import tempfile
from logging import getLogger
from pathlib import Path
from pathlib import Path, PurePosixPath
from typing import Literal, Union, cast, overload

import aiofiles
Expand Down Expand Up @@ -212,7 +212,7 @@ async def exec(
# additional args
args = []

final_cwd = Path(self._working_dir if cwd is None else cwd)
final_cwd = PurePosixPath(self._working_dir if cwd is None else cwd)
if not final_cwd.is_absolute():
final_cwd = self._working_dir / final_cwd

Expand Down

0 comments on commit c1be973

Please sign in to comment.