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

Container improvements #540

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Conversation

Robinsane
Copy link

  1. added 3 env variables to make life easier configuring shell_gpt containers:
    IN_CONTAINER: setting this one to true, helps fix some default things that aren't handy when in a container:
  • The default for interaction becomes False, since [E]xecute on host doesn't work when you get the output from a container
  • Shell_gpt will not check the machine for os and shell (which would be fetched from the container), but will check what the user has configured in following env vars: OS_OUTSIDE_CONTAINER and SHELL_OUTSIDE_CONTAINER
  1. adjusted Dockerfile to use new env vars + added an example ollama Dockerfile

Copy link
Owner

@TheR1D TheR1D left a comment

Choose a reason for hiding this comment

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

Could we also update Config and Docker section in README.md please?

sgpt/config.py Outdated Show resolved Hide resolved
sgpt/app.py Outdated Show resolved Hide resolved
Dockerfile_ollama Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
sgpt/role.py Outdated Show resolved Hide resolved
@ismaelchris
Copy link

These settings worked for me:

IN_CONTAINER=false
USE_LITELLM=true

@Robinsane Robinsane requested a review from TheR1D April 15, 2024 13:56
sgpt/app.py Outdated Show resolved Hide resolved
sgpt/role.py Outdated Show resolved Hide resolved
sgpt/role.py Outdated Show resolved Hide resolved
sgpt/config.py Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Robinsane and others added 5 commits April 24, 2024 09:57
default OVERWRITE_OS_NAME value "default" + got rid of redundant else

Co-authored-by: Farkhod Sadykov <[email protected]>
OVERWRITE_SHELL_NAME default value "default" + got rid of redundant else

Co-authored-by: Farkhod Sadykov <[email protected]>
@Robinsane Robinsane requested a review from TheR1D April 24, 2024 08:36
@Robinsane
Copy link
Author

Please give some feedback / merge when you have spare time :)

@TheR1D TheR1D added the docker Docker related label Jun 20, 2024
(Note: if SHELL_INTERACTION contains an unintended / weird value, it will act as if it contained false, which is not the intended default behaviour)
@Robinsane
Copy link
Author

Changes made + tested in our production environment.
I believe this is ready to be merged :)

Copy link
Owner

@TheR1D TheR1D left a comment

Choose a reason for hiding this comment

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

Thank you for the updates @Robinsane. I ran some tests as well and have a few suggestions.

README.md Outdated Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
suggestion TheR1D

Co-authored-by: Farkhod Sadykov <[email protected]>
Robinsane and others added 2 commits June 21, 2024 09:13
ENV PRETTIFY_MARKDOWN=false

Co-authored-by: Farkhod Sadykov <[email protected]>
…equests in combination with ShellGPT in a docker container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Docker related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants