Skip to content
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

Update ssh_box.py with adding "Create .bashrc file for the opendevin user" #1905

Conversation

lixiangtiandashen
Copy link

The useradd command does not automatically create the .bashrc file when creating the 'opendevin' user, and the following command for backing up .bashrc file in swe_env_box.py will report an error, which is (self.execute('mv ~/.bashrc ~/.bashrc.bak'))

…user"

useradd 指令创建用户时不会自动创建对应的.bashrc文件,后面的备份.bashrc文件的指令会报错
@li-boxuan
Copy link
Collaborator

li-boxuan commented May 19, 2024

@lixiangtiandashen Did you forget to add run_as_devin = false to your config.toml?

SWEBench sandbox requires this setting.

@lixiangtiandashen
Copy link
Author

@lixiangtiandashen Did you forget to add run_as_devin = false to your config.toml?

SWEBench sandbox requires this setting.

I don't. After changing run_as_devin to false in config.py, it did pass indeed. But I consider that its default value is true, I think it should also be able to pass with true, so I think it's a bug.

Copy link
Collaborator

@li-boxuan li-boxuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's documented in evaluation/swe_bench/README.md. I am guessing it's by design, but I'll let @xingyaoww confirm.

Marking this PR as "change requested" to prevent accidental merge.

@lixiangtiandashen
Copy link
Author

It's documented in evaluation/swe_bench/README.md. I am guessing it's by design, but I'll let @xingyaoww confirm.

Marking this PR as "change requested" to prevent accidental merge.

enen!Thank you, I'm also not sure if there is any special consideration involved.

@xingyaoww
Copy link
Collaborator

@lixiangtiandashen I think it is intended that run_as_devin = false for SWE-Bench eval -- all the repositories testbeds in the docker are created with root permission, and changing to opendevin user could cause unintended consequences. So we should try to set run_as_devin = false for SWE-Bench eval. Maybe we can add a warning or error if people try to use run_as_devin=true for the eval though.

@lixiangtiandashen
Copy link
Author

@lixiangtiandashen I think it is intended that run_as_devin = false for SWE-Bench eval -- all the repositories testbeds in the docker are created with root permission, and changing to opendevin user could cause unintended consequences. So we should try to set run_as_devin = false for SWE-Bench eval. Maybe we can add a warning or error if people try to use run_as_devin=true for the eval though.

Okay, thanks, I understand. In fact, the following steps do require root permission to continue, the swe_entry.sh requires root permission to execute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants