Adding extensions to text-generation-webui (as packaged by @dusty_nv in jetson-containers)

Adding extensions to the containerized text-generation-webui is a bit tricky because the container looses all modifications once stopped. I inherited @dusty_nv container and created a new image to add the five extensions below, the only modifications is the addition of those extensions.

  1. code_syntax_highlight

  2. chatbot_clinic

  3. dynamic_context

  4. hello_outside_world

  1. LLM_Web_search

I uploaded the new image to hub.docker.com. You can find it at rpontual/text-generation-webui. The inherited image is the image from dusty/text-generation-webui:36.2.0 (digest d4d006425e00 from 2/3/24) as such it requires JetPack 6. To run it use the same command you use to run the @dusty_nv version except that the image needs to start with rpontual/ (e.g. " ./run.sh $(./autotag rpontual/text-generation-webui)")

----- Fortune favors the bold… -----
In case you are interested in creating your own derived images, these are the steps I took initially to add extensions:

  • Open terminal window, ssh to Jetson, launch the default text-generation-webui
  • Go to a browser in your computer, reach the text-generation-webui with your browser
  • Navigate to Session tab and add load the extension using the “Install or update an extension”
  • Open a second terminal window, ssh to Jetson, execute Docker PS to get container ID
  • docker exec -it bash
  • inside the container go to /opt/text-generation-webui/extensions
  • locate the directory with the extension name and enter it (cd <extension_name>)
  • look for requirements.txt and run pip install (pray for not getting into pip conflicts…)
  • exit (to exit container)
  • at the terminal execute “docker commit containerid /yourrepository/text-generation-webui:36.2.0”
  • you can see your new image executing “docker images”
1 Like

Hi @pontual, thanks for writing this up and sharing this! If you wanted to be ‘extra bold’, I’d recommend creating your own dockerfile that uses dustynv/text-generation-webui as its base container, and then put all the commands you run to install the extensions in the dockerfile - then your build will be automated (as opposed to needing to run it by hand and then docker commit)

If oobabooga wasn’t one of the trickiest containers to keep building already (this seems to be because of its large number of dependencies and LLM loader libraries), I’d entertain having an ‘extensions’ container for text-generation-webui hosted in jetson-containers (and maybe we can still do that if you find it to be reliable, however my guess is these extensions can frequently break too)

Regardless, great work and hope you enjoy the fruits of your labor!

1 Like

Hi @dusty_nv, I like your suggestion and I agree with the oobabooga trickiest comment. It took me sometime to get the extensions I wanted working due to python package version conflicts and the peculiarities of remote access. I am now adding an extension to allow web search directly from Jetson, after that I will try the dockerfile approach.

@dusty_nv, I followed your suggestion and created my own dockerfile. The new version now includes web search. It is quite interesting now! Thank you for the ‘extra bold’ comment :)

1 Like

OK great! Glad you were able to get it working how you needed @pontual 👍

You could also create an extensions folder in data/extensions/text-generation-webui/extensions or something and mount it in the container at /opt/text-generation-webui/extensions, this would persist across runs and negate the need for a custom container and allow for easy modification