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

Dev #2

Open
wants to merge 116 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
8d2b754
[multi-chat] fix: trust all proxies.
Phate334 Jul 2, 2024
47125fc
Update README.md
vivianh38 Jul 5, 2024
e9438fa
[windows] fix: potential nginx conf issue
ifTNT Jul 14, 2024
fb895f3
[multi-chat] fix: remove debugging snippet
ifTNT Jul 14, 2024
014ed19
Merge pull request #21 from Phate334/fix-https-proxy
ifTNT Jul 14, 2024
9cd1a94
Merge branch 'dev' of github.com:kuwaai/genai-os into dev
ifTNT Jul 14, 2024
00ff80b
[multi-chat] fix: requrements of llama-cpp-python
ifTNT Jul 15, 2024
4264a85
[windows] fix: pip cache dir
ifTNT Jul 15, 2024
4fd94f2
Merge pull request #22 from vivianh38/patch-3
ifTNT Jul 17, 2024
bbd568e
Merge branch 'main' into dev
ifTNT Jul 17, 2024
aaf7441
[executor] fix: VLLM example
ifTNT Jul 23, 2024
34099e8
[executor, docker, windows] fix: proxy config
ifTNT Jul 24, 2024
b1cc079
[multi-chat] fix: trusted proxy env
ifTNT Jul 24, 2024
ab00216
[executor] add: vision and 4o-mini support
ifTNT Jul 24, 2024
bfd7c62
[executor] add: multi-modal support to gemini
ifTNT Jul 24, 2024
21f4504
[gemini] fix: use File API to process larger file
ifTNT Jul 24, 2024
ee4fc22
[gemini] fix: cache exception when deleting file
ifTNT Jul 24, 2024
5d90b80
[executor] add: dall-e image generation
ifTNT Jul 25, 2024
2cb4b19
[multi-chat] fix: change the uploaded file
ifTNT Jul 26, 2024
79019fd
[multi-chat] fix: center the elements in the store
ifTNT Jul 26, 2024
47af12e
[multi-chat] fix: unexpected ';'
ifTNT Jul 26, 2024
39dd38d
[multi-chat] fix: escape chat room name
ifTNT Jul 26, 2024
faaad16
[multi-chat] add: configurable max uploaded files
ifTNT Jul 26, 2024
f28977a
[multi-chat] fix: specify sotring type
ifTNT Jul 26, 2024
ac59fe4
Merge branch 'main' into dev
ifTNT Jul 26, 2024
c8a2fc6
[windows] fix: remove tee.bat
ifTNT Jul 28, 2024
69c5e17
fix: replace kuwaai.org with kuwaai.tw
ifTNT Jul 28, 2024
83d95a7
[multi-chat] add: edit bot image when editing bot
ifTNT Jul 28, 2024
d4cfc39
[multi-chat] add: edit bot image at creating bot
ifTNT Jul 28, 2024
7238263
[RAG] fix: change the default embedding model
ifTNT Jul 28, 2024
debd10d
[multi-chat] fix: preserve text of links
ifTNT Jul 28, 2024
7f9e21c
[docqa] add: arguments to hide content of ref.
ifTNT Jul 28, 2024
44095ac
[multi-chat] fix: OpenAI compatible API
ifTNT Jul 29, 2024
39f6d93
[windows] fix: support of <scheme>://<proxy>
ifTNT Jul 29, 2024
7427db4
[docker] fix: missing dependencies
ifTNT Jul 29, 2024
a218470
[RAG] add: initial cache mechanism
ifTNT Jul 30, 2024
c4f3436
[windows] add: support of llama3.1
ifTNT Jul 30, 2024
b7c8174
[docker] add: updating script
ifTNT Jul 30, 2024
f29a95d
[multi-chat] fix: API is not termiated
ifTNT Jul 31, 2024
461fe19
[docker] add: TRANSFORMERS_OFFLINE env
ifTNT Jul 31, 2024
1dfd919
[docqa] fix: Timehash
ifTNT Jul 31, 2024
db5550f
[multi-chat] add: non-streaming API
ifTNT Aug 2, 2024
0034aa4
[multi-chat] fix: behavior of multi-permissions
ifTNT Aug 2, 2024
e1c48ad
Merge branch 'main' into dev
ifTNT Aug 2, 2024
2ffc4ee
[multi-chat] fix: non-streaming API
ifTNT Aug 3, 2024
75bb2a4
[multi-chat] fix: export bot in multi-part form
ifTNT Aug 3, 2024
a44731b
[executor] add: pipe executor
ifTNT Aug 4, 2024
f533146
[docker] add: kuwa filesystem hierachy
ifTNT Aug 4, 2024
7d2de5d
[multi-chat] add: export bot with avatar
ifTNT Aug 4, 2024
48af7e1
[multi-chat] add: import bot
ifTNT Aug 4, 2024
3a0cfdd
[pipe] add: restricted path
ifTNT Aug 5, 2024
ff04cff
[pipe] add: support of argv
ifTNT Aug 5, 2024
852bbb4
[doc] fix: typo
ifTNT Aug 5, 2024
b0e87ee
[tools] add: basic calculator
ifTNT Aug 5, 2024
f4f2eb2
[pipe] add: extract content from codeblock
ifTNT Aug 5, 2024
5d89e83
[pipe] fix: prevent failed to write to stdin
ifTNT Aug 5, 2024
ca41312
[docqa] add: support loading archive of database
ifTNT Aug 5, 2024
e1a0d0d
[docqa] fix: Kuwa API client
ifTNT Aug 5, 2024
5be9097
[library] add: Kuwa API client library
ifTNT Aug 5, 2024
a2d72e0
[tools] add: basic uploader
ifTNT Aug 5, 2024
0d8726b
[multi-chat] add: perm. of ignoring upload cstrs.
ifTNT Aug 6, 2024
df37b51
[pipe] refactor: separate module
ifTNT Aug 6, 2024
531ecbb
[pipe] add: pass Kuwa API related env
ifTNT Aug 6, 2024
c644cd2
[tool] fix: rename to compatible with Windows
ifTNT Aug 6, 2024
6c6da5e
[executor] add: file manager
ifTNT Aug 6, 2024
d1deff5
[docker] add: build.sh
wcwutw Aug 6, 2024
423671c
[docker] add: build.sh
wcwutw Aug 6, 2024
8802b60
[docker] add: build.sh
wcwutw Aug 6, 2024
a56407a
[pipe] add: expose kuwa version to subprocess
ifTNT Aug 6, 2024
3aea164
[multi-chat] add: CLI tool to import bot
ifTNT Aug 7, 2024
b7718f2
[multi-chat] add: exp. backoff when importing bot
ifTNT Aug 7, 2024
a93a8fb
[multi-chat] fix: change definition "KUWABOT base"
ifTNT Aug 7, 2024
cb13472
[multi-chat] refactor: Create bot API
ifTNT Aug 7, 2024
33defc8
[multi-chat, client] fix: bot Creation API
ifTNT Aug 7, 2024
0de9f0a
Merge pull request #26 from wcwutw/main
ifTNT Aug 7, 2024
992ccbf
[docker] add: KUWA_ROOT env
ifTNT Aug 7, 2024
4f2bd65
[executor] add: uploader
ifTNT Aug 8, 2024
4a3de8d
Merge branch 'dev' of github.com:kuwaai/genai-os into dev
ifTNT Aug 8, 2024
c033434
[multi-chat] refactor: import bot
ifTNT Aug 8, 2024
520ab9e
[multi-chat] fix: Modelfile parsing and #24
ifTNT Aug 8, 2024
facfef5
[pipe] add: ensure_executable options
ifTNT Aug 8, 2024
5816cc3
[docker] fix: combing most of RAG executors
ifTNT Aug 8, 2024
0138cfe
[uploader] add: path check to prevent jail break
ifTNT Aug 8, 2024
1a2853b
Merge branch 'main' of https://github.com/wuchtw/genai-os into wuchtw…
ifTNT Aug 8, 2024
04fce03
Merge branch 'wuchtw-main' into dev
ifTNT Aug 8, 2024
3f78a18
[README] fix: official website URL
ifTNT Aug 8, 2024
ab506fc
[docker] fix: build.sh change reboot flag file location
wcwutw Aug 8, 2024
57378ff
[docker] fix: build.sh change reboot flag file location
wcwutw Aug 8, 2024
7dd8df1
[docker] fix: build.sh fix bug when terminating the installation of c…
wcwutw Aug 8, 2024
3ce451b
[docker] fix: build.sh change reboot flag file location
wcwutw Aug 8, 2024
07790ea
[README] fix: docker building command
ifTNT Aug 8, 2024
990bd8b
[bot] add: upload tool/vdb/web components
ifTNT Aug 8, 2024
4c90f8e
[execuotr] fix: strip the parameter
ifTNT Aug 9, 2024
b9d46e5
Merge pull request #29 from wcwutw/main
ifTNT Aug 9, 2024
ffa93f8
[multi-chat] fix: hide private bot from others
ifTNT Aug 9, 2024
f49ef32
[tool] add: syntex check to calculator
ifTNT Aug 9, 2024
c31c612
[multi-chat] fix: sort bots on window loaded
ifTNT Aug 9, 2024
139e164
[pipe, uploader] fix: execution security
ifTNT Aug 9, 2024
b89d393
[multi-chat] fix: importing bot error
ifTNT Aug 9, 2024
0a42a93
[pipe] fix: use shell to direct execute .py on win
ifTNT Aug 9, 2024
c47c862
[uploader] fix: escape file_path in botfile
ifTNT Aug 10, 2024
8c2321f
[windows] add: pipe, uploader
ifTNT Aug 10, 2024
da12e37
[windows] add: run.bat of pipe uploader, dbqa
ifTNT Aug 10, 2024
a8668c1
[windows] add: download script of Llama3.1
ifTNT Aug 10, 2024
db6e9b5
[windows] fix: exit from download.bat
ifTNT Aug 10, 2024
04aa2ef
[windows] fix: add KUWA_ROOT
ifTNT Aug 10, 2024
a56ed3f
[pipe, tool] fix: portable between unix and window
ifTNT Aug 10, 2024
35454aa
[windows] fix: portable run.bat
ifTNT Aug 10, 2024
faa8334
[bot] add: Python bot
ifTNT Aug 10, 2024
3e32200
[bot] refactor: rename the bots
ifTNT Aug 10, 2024
52b7bf2
[chatgpt] fix: update logo
ifTNT Aug 10, 2024
609e8cc
[docker] fix: bot name
ifTNT Aug 10, 2024
d780e1d
[windows, docker] add: dall-e executor
ifTNT Aug 10, 2024
528f2a6
[multi-chat] fix: scrolling on mobile
ifTNT Aug 10, 2024
e6ceb61
Update README_TW.md
wuchtw Aug 11, 2024
155d247
Update README.md
wuchtw Aug 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<h1 align="center">
<br>
<a href="https://kuwaai.org/en-US/">
<a href="https://kuwaai.tw/">
<img src="./src/multi-chat/public/images/kuwa.png" alt="Kuwa GenAI OS" width="200"></a>
<br>
Kuwa GenAI OS
Expand All @@ -13,13 +13,28 @@

<p align="center">
<a href="http://makeapullrequest.com">
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg">
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?logo=github&logoColor=white">
</a>
<a href="#">
<img src="https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square">
</a>
<a href="https://laravel.com/docs/10.x/releases">
<img src="https://img.shields.io/badge/maintained%20with-Laravel-cc00ff.svg">
<img src="https://img.shields.io/badge/maintained%20with-Laravel-cc00ff.svg?logo=laravel&logoColor=white">
</a>
<a href="https://discord.gg/Gu7zPavEmN">
<img src="https://img.shields.io/badge/discord-active-blue?logo=discord&logoColor=white">
</a>
<a href="#">
<img src="https://img.shields.io/github/v/release/kuwaai/genai-os">
</a>
<a href="#">
<img src="https://img.shields.io/github/downloads/kuwaai/genai-os/total">
</a>
<a href="#">
<img src="https://img.shields.io/github/license/kuwaai/genai-os">
</a>
<a href="#">
<img src="https://img.shields.io/github/stars/kuwaai">
</a>
</p>

Expand All @@ -45,7 +60,7 @@
## Architecture
> **Warning**: This a preliminary draft and may be subject to further changes.

[![screenshot](./src/multi-chat/public/images/architecture.svg)](https://kuwaai.org/os/Intro)
[![screenshot](./src/multi-chat/public/images/architecture.svg)](https://kuwaai.tw/os/Intro)

## Installation Guide
### Quick Installation
Expand All @@ -56,9 +71,9 @@ Download the script or the executable file, run it, and follow its steps to have

* **Linux/Docker**

Download and run [build.sh](./docker/build.sh) , or invoke the following command to automatically install Docker, Cuda, and Kuwa
Download and run sudo [build.sh](./docker/build.sh) , or invoke the following command to automatically install Docker, CUDA, and Kuwa. You may need to reboot after installing CUDA. Before finishing installation, you will be asked to set your administration passwords for your Kuwa and database. After installation, it will invoke run.sh to start the system and you can log in with admin@localhost. Enjoy!
```
curl -fsSL https://github.com/kuwaai/genai-os/tree/main/docker/build.sh | sh
curl -fsSL https://raw.githubusercontent.com/kuwaai/genai-os/main/docker/build.sh | sudo sh
```
### Step-by-step Installation
You can build your own customized Kuwa by following the step-by-step documents.
Expand Down
16 changes: 8 additions & 8 deletions README_TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<h1 align="center">
<br>
<a href="https://kuwaai.org/zh-Hant/">
<a href="https://kuwaai.tw/zh-Hant/">
<img src="./src/multi-chat/public/images/kuwa.png" alt="Kuwa GenAI OS" width="200"></a>
<br>
Kuwa GenAI OS
Expand Down Expand Up @@ -33,29 +33,29 @@
</p>

## 關鍵功能
* 提供多語言生成式人工智慧的使用、開發與部署的整體解決方案,支援Windows、Linux及MacOS
* 提供生成式人工智慧的使用、開發與部署的整體解決方案,支援多語言及Windows、Linux、MacOS
* 提供多模型群聊、引用、劇本匯入、生成內容完整匯出、多樣分享等自主編導與指揮的友善使用功能
* 支援多模態模型,整合多項現有RAG/Agent開發工具,可串接傳統應用程式、自建Store應用商店
* 可免寫程式,靈活組合「提示劇本x知識庫x模型x工具x腳本」等即可打造個人化強大的GenAI應用
* 支援多模態模型,整合多項現有RAG/Agent開發工具,也可串接傳統應用程式、自建Store應用商店
* 可免寫程式,藉由靈活組合「提示劇本x知識庫x模型x工具x腳本」即可打造個人化強大的GenAI應用
* 支援單板電腦、筆記型電腦、個人電腦、虛擬主機、地端伺服器,以及公私或混合雲端等各種環境
* 開放原始碼,允許開發人員貢獻並根據自己的需求打造自己的客製系統
* 開放原始碼,允許開發人員或企業根據自己的需求打造自己的客製系統,快速對內或對外提供服務

![screenshot](./src/multi-chat/public/images/demo.gif)

## 架構
> **警告**: 本草案為初步版本,可能會有進一步的更改。

[![screenshot](./src/multi-chat/public/images/architecture.svg)](https://kuwaai.org/os/Intro)
[![screenshot](./src/multi-chat/public/images/architecture.svg)](https://kuwaai.tw/os/Intro)

## 安裝指南
### 快速安裝
可下載單一Script或檔案,依指示操作即可快速安裝
* **Windows**
下載最新版本GenAI OS的[Windows版單一執行檔](https://github.com/kuwaai/genai-os/releases)
* **Linux/Docker**
可利用 [build.sh](./docker/build.sh) 或在Linux下執行以下指令即可自動下載及安裝Docker、CUDA及Kuwa
可下載 [build.sh](./docker/build.sh) 後執行 **sudo build.sh**,或在Linux下執行以下指令即可自動下載及安裝Docker、CUDA及Kuwa。安裝CUDA後需重開機,安裝完成前會設定管理者及資料庫密碼,全部安裝完成後會執行 run.sh 自動啟動Kuwa,預設用 admin@localhost 帳號登入。
```
curl -fsSL https://github.com/kuwaai/genai-os/tree/main/docker/build.sh | sh
curl -fsSL https://raw.githubusercontent.com/kuwaai/genai-os/main/docker/build.sh | sudo sh
```
### 手動安裝
可參考安裝文件逐步進行手動安裝
Expand Down
14 changes: 13 additions & 1 deletion docker/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,16 @@ PUBLIC_BASE_URL="http://${DOMAIN_NAME}/"
ADMIN_NAME="Kuwa Admin"
ADMIN_EMAIL="admin@${DOMAIN_NAME}"
DB_USERNAME=kuwa
DB_DATABASE=kuwa-genai-os
DB_DATABASE=kuwa-genai-os

# To enable offline mode for the execution of transformers, set the environment
# variable TRANSFORMERS_OFFLINE to 1 before running executors in
# firewall-restricted or network-unavailable environments.
# TRANSFORMERS_OFFLINE=1

# To configure an HTTPS service using a reverse proxy, designate the reverse proxy
# as a trusted entity, allowing it to automatically prepend the "https://" prefix
# when generating links.
# Example1: TRUSTED_PROXIES=*
# Example2: TRUSTED_PROXIES=192.168.1.1,192.168.1.2
TRUSTED_PROXIES=
188 changes: 188 additions & 0 deletions docker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
#!/bin/bash
# set -x


REBOOT_FLAG=".reboot_flag"
NOW_PATH=$(pwd)

install_docker() {
# Add official GPG key
if ! command -v docker &> /dev/null; then
echo "Installing Docker..."

# Setup repository
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update

# Install necessary package
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

# Enable the service
systemctl --now enable docker

# Enable unattended-update
cat <<EOT | tee /etc/apt/apt.conf.d/51unattended-upgrades-docker
Unattended-Upgrade::Origins-Pattern {
"origin=Docker";
};
EOT
else
echo "Docker is already installed."
fi
}

install_nvidia_driver() {
if ! command -v nvidia-smi &> /dev/null; then
echo "Installing Nvidia driver..."
apt update
apt upgrade -y

# Remove previous NVIDIA installation
apt autoremove nvidia* --purge -y
apt autoclean

# Install Ubuntu and NVIDIA drivers
local version=$(ubuntu-drivers devices 2>/dev/null | grep recommended | grep -oP 'nvidia-driver-\d+')
#echo "$version"
ubuntu-drivers autoinstall
apt install -y $version

# Reboot
touch "$REBOOT_FLAG"
reboot
else
echo "Nvidia Driver is already installed."
fi

}

install_cuda_toolkit() {
if ! command -v nvcc --version &> /dev/null; then
echo "Installing CUDA toolkit..."
apt update
apt upgrade -y

# Install CUDA toolkit
apt install -y nvidia-cuda-toolkit
else
echo "CUDA toolkit is already installed."
fi
}

install_nvidia_container_toolkit() {
if ! command -v which nvidia-container-toolkit &> /dev/null; then
echo "Installing Nvidia continaer toolkit"

# Setup GPG key
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg

# Setup the repository
local distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
apt-get update
apt-get install -y nvidia-container-toolkit

# Configure the NVIDIA runtime to be the default docker runtime
nvidia-ctk runtime configure --runtime=docker --set-as-default
systemctl restart docker
else
echo "Nvidia toolkit is already installed."
fi
}

install_kuwa() {
# Download Kuwa repository
cd "$NOW_PATH"
git clone https://github.com/kuwaai/genai-os/
cd genai-os/docker

# Change configuration files
cp .admin-password.sample .admin-password
cp .db-password.sample .db-password
cp .env.sample .env

# Set admin password
while true; do
read -sp "Enter admin password: " admin_passwd
echo
read -sp "Confirm admin password: " admin_passwd_confirm
echo

if [ "$admin_passwd" == "$admin_passwd_confirm" ]; then
echo "Admin password set successfully."
echo "$admin_passwd" > .admin-password
break
else
echo "Passwords do not match. Please enter your password again."
fi
done

# Set database password
while true; do
read -sp "Enter database password: " db_passwd
echo
read -sp "Confirm database password: " db_passwd_confirm
echo

if [ "$db_passwd" == "$db_passwd_confirm" ]; then
echo "Database password set successfully."
echo "$db_passwd" > .db-password
break
else
echo "Passwords do not match. Please enter your password again."
fi
done
}

fix() {
cd executor
echo "llama-cpp-python @ https://github.com/abetlen/llama-cpp-python/releases/download/v0.2.77/llama_cpp_python-0.2.77-cp310-cp310-linux_x86_64.whl" > requirements.txt
cd ../../src/executor
sed -i 's/==/ == /g' requirements.txt
cd ../../docker/executor
local LINES_TO_ADD=$(cat << 'EOF'
COPY docker/executor/requirements.txt ./requirements-docker.txt
EOF
)
sed -i "8a${LINES_TO_ADD}" "Dockerfile"
LINES_TO_ADD=$(cat << 'EOF'
RUN pip install --no-cache-dir -r requirements-docker.txt
EOF
)
sed -i "9a${LINES_TO_ADD}" "Dockerfile"
cd ..
}

install_all() {
if [[ -f "$REBOOT_FLAG" ]]; then
echo "System has been rebooted. Continuing installation."
install_cuda_toolkit
install_nvidia_container_toolkit
rm -f "$REBOOT_FLAG"
elif ! command -v nvidia-smi &> /dev/null; then
apt-get update
apt-get upgrade
else
apt-get install curl
read -p "Do you want to install NVIDIA GPU drivers? [y/N]: " install_gpu
if [[ "$install_gpu" == "y" || "$install_gpu" == "Y" ]]; then
install_nvidia_driver
fi
fi
install_docker
install_kuwa
fix
#cd "$PATH/genai-os/docker"
cp run.sh.sample run.sh
./run.sh
}

echo "Kuwa docker build script v0.1.0"
echo "This will install kuwa automatically on Ubuntu 22.04"
sleep 2
install_all
1 change: 1 addition & 0 deletions docker/compose/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom
12 changes: 11 additions & 1 deletion docker/compose/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ services:
ADMIN_PASSWORD_FILE: /run/secrets/admin-password
secrets:
- admin-password
volumes: ["multi-chat-storage:/app/storage:rw"]
volumes: [
"multi-chat-storage:/app/storage:rw",
"../root/custom:/app/resources/views/components/custom:ro",
"../root/bootstrap/bot:/var/kuwa/docker/root/bootstrap/bot:ro",
]
healthcheck:
test: ["CMD-SHELL", "php-fpm-healthcheck"]
timeout: 10s
Expand All @@ -61,6 +65,12 @@ services:

volumes:
multi-chat-storage: {}
kuwa-root: # The root of Kuwa filesystem hierarchy to store user-uploaded data during runtime.
driver: local
driver_opts:
type: none
device: "../root"
o: bind

secrets:
admin-password:
Expand Down
27 changes: 27 additions & 0 deletions docker/compose/custom-dbqa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
services:
custom-dbqa-executor:
build:
context: ../../
dockerfile: docker/executor/Dockerfile
image: kuwa-executor
environment:
CUSTOM_EXECUTOR_PATH: ./docqa/docqa.py
EXECUTOR_ACCESS_CODE: db-qa:custom-db
EXECUTOR_NAME: DB QA (Custom DB)
TRANSFORMERS_OFFLINE: ${TRANSFORMERS_OFFLINE:-0} # For embedding model
volumes: [
"</path/to/vector-database>:/var/database/",
"kuwa-root:/var/kuwa/docker/root:rw", # The root of Kuwa filesystem hierarchy to store user-uploaded data during runtime.
"~/.cache/huggingface:/root/.cache/huggingface"
]
depends_on:
- kernel
- multi-chat
command: [
"--api_base_url", "http://web/",
"--model", "gemini-pro",
"--database", "/var/database/",
"--log", "debug"
]
restart: unless-stopped
networks: ["backend", "frontend"]
22 changes: 22 additions & 0 deletions docker/compose/dall-e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
services:
painter-executor:
build:
context: ../../
dockerfile: docker/executor/Dockerfile
image: kuwa-executor
environment:
CUSTOM_EXECUTOR_PATH: ./image_generation/dall_e.py
EXECUTOR_ACCESS_CODE: dall-e
EXECUTOR_NAME: DALL-E
EXECUTOR_IMAGE: dall-e.png # Refer to src/multi-chat/public/images
depends_on:
- kernel
- multi-chat
command: []
volumes: [
"~/.cache/huggingface:/root/.cache/huggingface",
]
extra_hosts:
- "localhost:host-gateway"
restart: unless-stopped
networks: ["backend", "frontend"]
Loading