You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thanks for a great project! I'm now looking for a way to give several users an access to the interpreter simultanoiusly, so I need "sessions" feature.
I saw PR "feat:Add support for containerized Code execution, and utilities ( upload / download fn ). #459" but the proposed solution seems to be very complex and overengineered. So I'm looking for other ways to accomplish this and want to share my thoughts and listen to community advices.
What I want to get:
Several sessions can be run simultaniosly
Sessions are more or less isolated, i.e. user of one session can't write such prompt that can affect files and flow of other sessions.
Sessions persist so that we can return to dialogue in 1-2 weeks and continue it from the point we left it, and with files we uploaded/processed to the moment
Not too much overhead fo each session in terms of memory and hard drive
What solutions are possible?
We can make 1 session = 1 docker container, but it seems to be non-realistic solution because of huge memory and cpu overhead, also a lot of DevOps headache.
We can have 1 docker where we run several instances of open-interpreter inside one container. But what about sessions and file storage? We can bind external volume with subfolders where 1 subfolder = 1 session, and we can name that folder like session GUID. But how to make Open Interpreter work with particular folder as its root and whatever user writes in his prompt there should be no way how Open Interpreter can come to the subfolder of other session with any file read/write operation from executed Python script?
I'm thinking about using venv somehow to separate user sessions, but it seems to be overhead in storing the same set of Python libraries several times (for each session), also I don't know how fast is it to create new venv instances for each session. Still we have open problem with storing and separating uploads/processed files of each session.
How do you think what is the best solution?
The text was updated successfully, but these errors were encountered:
Perhaps multiple containers? It certainly would be the ideal solution for isolation.
When I decided to give OI a try I just assumed that a Docker container would be the best way, so I was a bit surprised at the uncertainty about this option in the docs. I'm not really sure what the concern is, and I think this method should be promoted for techie users since it is a safe way to use OI.
Regarding your concern about the resources requirements of using multiple containers, I would comment that I started from an Alpine image, and that image (with a bunch of stuff installed) is now 660 MB. I would imagine that, if size is a priority and some effort were made, it could be reduced a decent amount.
For the record, here is how I used it. I used a dev container, which is a slight variation on a docker container and it allowed me to use images with VSCode built-in. My devcontainer.json (like a docker file) looks like this ...
{"name": "Alpine",// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile"image": "mcr.microsoft.com/devcontainers/base:alpine-3.19",// Features to add to the dev container. More info: https://containers.dev/features.// "features": {},"containerEnv": {"OPENAI_API_KEY": "...","GCP_API_KEY": "..."}}
First of all thanks for a great project! I'm now looking for a way to give several users an access to the interpreter simultanoiusly, so I need "sessions" feature.
I saw PR "feat:Add support for containerized Code execution, and utilities ( upload / download fn ). #459" but the proposed solution seems to be very complex and overengineered. So I'm looking for other ways to accomplish this and want to share my thoughts and listen to community advices.
What I want to get:
What solutions are possible?
We can make 1 session = 1 docker container, but it seems to be non-realistic solution because of huge memory and cpu overhead, also a lot of DevOps headache.
We can have 1 docker where we run several instances of open-interpreter inside one container. But what about sessions and file storage? We can bind external volume with subfolders where 1 subfolder = 1 session, and we can name that folder like session GUID. But how to make Open Interpreter work with particular folder as its root and whatever user writes in his prompt there should be no way how Open Interpreter can come to the subfolder of other session with any file read/write operation from executed Python script?
I'm thinking about using venv somehow to separate user sessions, but it seems to be overhead in storing the same set of Python libraries several times (for each session), also I don't know how fast is it to create new venv instances for each session. Still we have open problem with storing and separating uploads/processed files of each session.
How do you think what is the best solution?
The text was updated successfully, but these errors were encountered: