Skip to content

Commit

Permalink
Merge pull request #108 from davemecha/gitpodify
Browse files Browse the repository at this point in the history
Gitpodify - Add support to launch Open UI in Gitpod
  • Loading branch information
vanpelt authored May 20, 2024
2 parents 34d940e + c97527f commit 96464d5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Image of workspace. Learn more: https://www.gitpod.io/docs/configure/workspaces/workspace-image
image: gitpod/workspace-full:latest

# List the start up tasks. Learn more: https://www.gitpod.io/docs/configure/workspaces/tasks
tasks:
- name: Run Open UI
init: |
mkdir $GITPOD_REPO_ROOT/../venv
cd $GITPOD_REPO_ROOT/../venv
python -m venv openui
source openui/bin/activate
cd $GITPOD_REPO_ROOT/backend
pip install .
gp sync-done init-done
command: |
source $GITPOD_REPO_ROOT/../venv/openui/bin/activate
cd $GITPOD_REPO_ROOT/backend
python -m openui
# List the ports to expose. Learn more: https://www.gitpod.io/docs/configure/workspaces/ports
ports:
- name: Open UI
description: Port 7878 for Open UI
port: 7878
onOpen: notify

# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,20 @@ The codespace installs ollama automaticaly and downloads the `llava` model. You

<img src="./assets/ollama.png" width="500" alt="Select Ollama models" />

### Gitpod

You can easily use Open UI via Gitpod, preconfigured with Open AI.

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/wandb/openui)

On launch Open UI is automatically installed and launched.

Before you can use Gitpod:

* Make sure you have a Gitpod account.
* To use Open AI models set up the `OPENAI_API_KEY` environment variable in your Gitpod [User Account](https://gitpod.io/user/variables). Set the scope to `wandb/openui` (or your repo if you forked it).

> NOTE: Other (local) models might also be used with a bigger Gitpod instance type. Required models are not preconfigured in Gitpod but can easily be added as documented above.
### Resources

Expand Down

0 comments on commit 96464d5

Please sign in to comment.