add mkdir (#317)

This commit is contained in:
Yufan Song 2024-03-28 12:39:40 -07:00 committed by GitHub
parent 94120f2b5d
commit dedd09fdf5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -94,9 +94,7 @@ class DockerInteractive:
else:
self.instance_id = str(uuid.uuid4())
if workspace_dir is not None:
assert os.path.exists(
workspace_dir
), f"Directory {workspace_dir} does not exist."
os.makedirs(workspace_dir, exist_ok=True)
# expand to absolute path
self.workspace_dir = os.path.abspath(workspace_dir)
else: