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
Copy file name to clipboardExpand all lines: README.md
+6-13
Original file line number
Diff line number
Diff line change
@@ -453,21 +453,16 @@ Possible options for `CODE_THEME`: https://pygments.org/styles/
453
453
```
454
454
455
455
## Docker
456
-
Run the container using the `OPENAI_API_KEY` environment variable, and a docker volume to store cache:
456
+
Run the container using the `OPENAI_API_KEY` environment variable, and a docker volume to store cache. Consider to set the environment variables `OS_NAME` and `SHELL_NAME` according to your preferences.
457
457
```shell
458
458
docker run --rm \
459
-
--env OPENAI_API_KEY="your OPENAI API key" \
459
+
--env OPENAI_API_KEY=api_key \
460
+
--env OS_NAME=$(uname -s) \
461
+
--env SHELL_NAME=$(echo $SHELL) \
460
462
--volume gpt-cache:/tmp/shell_gpt \
461
-
ghcr.io/ther1d/shell_gpt --chat rainbow "what are the colors of a rainbow"
463
+
ghcr.io/ther1d/shell_gpt -s "update my system"
462
464
```
463
465
464
-
When using a container, please note:
465
-
* The \[E\]xecute option for --shell with interaction will not work, since it would try this Execute in the docker container.
466
-
=> setting the `SHELL_INTERACTION` environment variable to false , makes sense.
467
-
* Since, most likely the os and shell of your container are not identical to the environment you want help with:
468
-
set the environment variables `OS_NAME` and `SHELL_NAME` according to your setup.
469
-
470
-
471
466
Example of a conversation, using an alias and the `OPENAI_API_KEY` environment variable:
472
467
```shell
473
468
alias sgpt="docker run --rm --volume gpt-cache:/tmp/shell_gpt --env OPENAI_API_KEY --env OS_NAME=$(uname -s) --env SHELL_NAME=$(echo $SHELL) ghcr.io/ther1d/shell_gpt"
@@ -476,8 +471,6 @@ sgpt --chat rainbow "what are the colors of a rainbow"
476
471
sgpt --chat rainbow "inverse the list of your last answer"
477
472
sgpt --chat rainbow "translate your last answer in french"
478
473
```
479
-
Note:
480
-
Consider filling in a more specific OS_NAME instead of using $(uname -s)
481
474
482
475
You also can use the provided `Dockerfile` to build your own image:
483
476
```shell
@@ -498,7 +491,7 @@ ENV USE_LITELLM=true
498
491
ENV OPENAI_API_KEY=bad_key
499
492
ENV SHELL_INTERACTION=false
500
493
ENV PRETTIFY_MARKDOWN=false
501
-
ENV OS_NAME="Red Hat Enterprise Linux 8.6 (Ootpa)"
0 commit comments