launcher

package module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 12 Imported by: 0

README

Text Generation WEBUI Launcher

Portable https://github.com/oobabooga/text-generation-webui installation. Independent of already installed Python or Conda environments. Self-contained setup. Single binary entrypoint.

TBH no idea if anything I described above is actually true. This project was put together in few minutes, so... Not really tested anywhere ;-)

Download

https://github.com/r3dsh/text-generation-webui-launcher/blob/main/dist/launcher.exe

Usage

Since Launcher supports multiple text-generation-webui installations (ie. different branches), -home argument is always required.

On Windows

dist\launcher.exe -install -home D:\oobabooga -- --model-dir D:\models --chat --auto-launch

works with git bash as well

dist/launcher.exe --home /d/oobabooga -- -h

That's basically it, GUI should open in your browser in chat mode. See launcher --help and launcher --home YOUR_HOME -- -h

Building

For Windows

go build -o dist/launcher.exe cmd/main.go

For Linux

go build -o dist/launcher cmd/main.go

Building with Docker

On Windows

docker run --rm -ti -v %cd%:/go/src golang:1.20 bash -c "cd src; GOOS=windows go build -o dist/launcher.exe cmd/main.go"

On Linux

docker run --rm -ti -v $(pwd):/go/src golang:1.20 bash -c "cd src; go build -o dist/launcher cmd/main.go"

TODO

Add support for zip bundles allowing to download whole environment as one big file (approx. 1GB) instead of pulling a bunch of small files.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PythonDistURL = "https://www.python.org/ftp/python/%s/python-%s-embed-amd64.zip"
	PythonVersion = "3.10.11"
)

Functions

func Download

func Download(dir string, source string) error

func LauncherArgs

func LauncherArgs() ([]string, []string)

func Unzip

func Unzip(zipFile, dst string) error

Types

type Launcher

type Launcher struct {
	HomeDir   string
	Branch    string
	TempDir   string
	WebUIDir  string
	PythonDir string
	// contains filtered or unexported fields
}

func New

func New(home, branch string, serverArgs []string) *Launcher

func (*Launcher) Configure

func (t *Launcher) Configure() error

Configure - configuration stuff, install real PIP for example.

func (*Launcher) Git

func (t *Launcher) Git() error

func (*Launcher) Install

func (t *Launcher) Install() error

func (*Launcher) InstallRequirements

func (t *Launcher) InstallRequirements() error

func (*Launcher) IsInstalled

func (t *Launcher) IsInstalled() bool

@TODO: tbh I forgot why I needed this

func (*Launcher) PipInstall

func (t *Launcher) PipInstall(pkgs []string) error

func (*Launcher) StartUI

func (t *Launcher) StartUI() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL