Skip to content

Revert "Always pull sandbox image" #2560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions opendevin/runtime/docker/ssh_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,18 +348,19 @@ def setup_user(self):
)
# check the miniforge3 directory exist
exit_code, logs = self.container.exec_run(
[
'/bin/bash',
'-c',
'[ -d "/opendevin/miniforge3" ] && exit 0 || exit 1',
],
['/bin/bash', '-c', '[ -d "/opendevin/miniforge3" ] && exit 0 || exit 1'],
workdir=self.sandbox_workspace_dir,
environment=self._env,
)
if exit_code != 0:
raise Exception(
f'An error occurred while checking if miniforge3 directory exists: {logs}'
)
if exit_code == 1:
raise Exception(
f'OPENDEVIN_PYTHON_INTERPRETER is not usable. Please pull the latest Docker image: docker pull ghcr.io/opendevin/sandbox:main'
)
else:
raise Exception(
f'An error occurred while checking if miniforge3 directory exists: {logs}'
)
# chown the miniforge3
exit_code, logs = self.container.exec_run(
['/bin/bash', '-c', 'chown -R opendevin:root /opendevin/miniforge3'],
Expand Down