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

make settings.yaml persistent!!! #40

Open
Gee1111 opened this issue Feb 15, 2024 · 2 comments
Open

make settings.yaml persistent!!! #40

Gee1111 opened this issue Feb 15, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Gee1111
Copy link

Gee1111 commented Feb 15, 2024

find a way to make it persistent. e.g. apply a patch after u get https://github.com/oobabooga/text-generation-webui.git in dockerfile to change the default dir for settings.yaml to eg /extensions

it's absolutely annoying

heres the patch u have to use:

https://github.com/Gee1111/text-generation-webui/blob/main/make_settings_persistent.patch

edit send u a merge request but its better to put the make_settings_persistent.patch in your own repo and access it from there

@Atinoda
Copy link
Owner

Atinoda commented Feb 15, 2024

TLDR; - ./config/settings.yaml:/app/settings.yaml

Hi, thanks for sharing your issue - and big thanks for submitting a PR too!

You prompted me to look into this a bit... normally Docker images are stateless - in this case, that means the settings should be configured via EXTRA_LAUNCH_ARGS string and not by fiddling around in the runtime. However, it seems that extensions and modules make liberal use of the settings.yaml file, and I don't think all options are settable via flags - so your suggestion makes sense in the context of this project.

During the course of examining the upstream code, I noted that there is an option to specify a settings file using the --settings $FILE launch argument. I would prefer to avoid patching the project source code unless absolutely unavoidable, so for that reason I will not merge your PR as it stands because it relies upon changes to the application source. However, if you would like to develop an approach that does not patch the source, I would consider merging it!

I do not have an exact implementation for this feature yet, but two approaches come to mind: 1) symlink the default file to a mountable folder and add business logic to the entrypoint script to handle its initialisation, or 2) specify a custom file using the setting flag I mentioned earlier (although I do not 100% like this one because it relies on passing an argument to the program, which a user may override).

For an immediate fix, I suggest just mounting a settings.yaml directly to the correct location by adding -./config/settings.yaml:/app/settings.yaml as a new entry in the volumes section of docker-compose.yml. Note that you may need to instantiate that file first, either with a template or by extracting settings from a configured container.

@Atinoda Atinoda added the enhancement New feature or request label Feb 15, 2024
@Gee1111
Copy link
Author

Gee1111 commented Feb 16, 2024

found this "--settings $FILE" too but this dosnt work

update: nevermind i got it working

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

No branches or pull requests

2 participants