Skip to content

Commit 64c2a78

Browse files
authored
Revert "Always pull sandbox image (#2538)" (#2560)
This reverts commit 6dd2491.
1 parent 1ffaed4 commit 64c2a78

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

opendevin/runtime/docker/ssh_box.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -348,18 +348,19 @@ def setup_user(self):
348348
)
349349
# check the miniforge3 directory exist
350350
exit_code, logs = self.container.exec_run(
351-
[
352-
'/bin/bash',
353-
'-c',
354-
'[ -d "/opendevin/miniforge3" ] && exit 0 || exit 1',
355-
],
351+
['/bin/bash', '-c', '[ -d "/opendevin/miniforge3" ] && exit 0 || exit 1'],
356352
workdir=self.sandbox_workspace_dir,
357353
environment=self._env,
358354
)
359355
if exit_code != 0:
360-
raise Exception(
361-
f'An error occurred while checking if miniforge3 directory exists: {logs}'
362-
)
356+
if exit_code == 1:
357+
raise Exception(
358+
f'OPENDEVIN_PYTHON_INTERPRETER is not usable. Please pull the latest Docker image: docker pull ghcr.io/opendevin/sandbox:main'
359+
)
360+
else:
361+
raise Exception(
362+
f'An error occurred while checking if miniforge3 directory exists: {logs}'
363+
)
363364
# chown the miniforge3
364365
exit_code, logs = self.container.exec_run(
365366
['/bin/bash', '-c', 'chown -R opendevin:root /opendevin/miniforge3'],

0 commit comments

Comments
 (0)