SSHBox should be able to run with custom images
What problem or use case are you trying to solve? We provide a default sandbox container image with lots of software pre-installed. But we also want users to be able to bring their own sandbox. This is important for users working in languages/tools that aren't pre-installed on the sandbox
SSHBox assumes that sshd is available in the sandbox, which often isn't true for default language images like node and go.
Do you have thoughts on the technical implementation?
We should probably make ssh a "plugin" that can be installed at runtime. I have a draft going for this
CC @xingyaoww
Another route could be user provide an image, we have a Dockerfile or smth that adds OpenDevin dependencies on top of that images and built it for the user locally.
Though we might need different package manager like yum or apt for different Linux distribution.
Yeah I'm working on the package manager aspect--not too hard to have an if/else to find the right manager.
I really want users to be able to use off-the-shelf images like node rather than maintaining their own images
Side note: it'd also be super great if, say, the user can just provide an SSH login and credentials, and OpenDevin can SSH into that machine and have everything set up automatically, though I think it will be a longer goal. But I can't wait to let OpenDevin debug my GPU jobs.
@rbren You mentioned you have a draft going. Could you post a WIP pull request so we can see your approach and perhaps contribute?
As a short term hack, I am wondering if there is a way to pass in my image. I can see there is a variable for this in the make file but I am missing where the image is referenced when opendevin starts from the app container image...
@rbren shared at https://opendevin.slack.com/archives/C06P5NCGSFP/p1715441034518169 that SANDBOX_CONTAINER_IMAGE env var is defined in core/schema/config.py. This value also appears in core/config.py, and eferenced in exec_box.py and ssh_box.py.
I appear to have lost my draft :(
SANDBOX_CONTAINER_IMAGE does work, but SSHBox needs an ssh daemon running so that it can connect in. I was trying to set that up on the fly, rather than making it part of the sandbox entrypoint
@xingyaoww has this been addressed with the sanbox-agnostic PR as well as the document that allows custom images? https://docs.all-hands.dev/modules/usage/custom_sandbox_guide
@mamoodi Yes! Let's close this issue!