Backend.AI WebUI Host
Project description
Backend.AI Web Server
A webapp hosting daemon which serves our webui
as a SPA and proxies API requests
Installation
Prepare a Python virtualenv (Python 3.9 or higher) and a Redis server (6.2 or higher).
$ git clone https://github.com/lablup/backend.ai-webserver webserver
$ cd webserver
$ pip install -U -e .
$ cp webserver.sample.conf webserver.conf
Mode
If service.mode
is set "webui" (the default), the webserver handles
PWA-style fallbacks (e.g., serving index.html
when there are no matching
files for the requested URL path).
The PWA must exclude /server
and /func
URL prefixes from its own routing
to work with the webserver's web sessions and the API proxy.
If it is set "static", the webserver serves the static files as-is,
without any fallbacks or hooking, while preserving the /server
and /func
prefixed URLs and their functionalities.
If you want to serve web UI in webserver with "webui" mode, prepare static web UI source by choosing one of the followings.
Option 1: Build web UI from source
Build backend.ai-webui and copy all files under build/bundle
into the src/ai/backend/web/static
directory.
Option 2: Use pre-built web UI
To download and deploy web UI from pre-built source, do the following:
cd src/ai/backend/web
curl --fail -sL https://github.com/lablup/backend.ai-webui/releases/download/v$TARGET_VERSION/backend.ai-webui-bundle-$TARGET_VERSION.zip > /tmp/bai-webui.zip
rm -rf static
mkdir static
cd static
unzip /tmp/bai-webui.zip
Setup configuration for webserver
You don't have to write config.toml
for the web UI as this webserver auto-generates it on-the-fly.
Edit webserver.conf
to match with your environment.
Usage
To execute web server, run command below. (for debugging, append a --debug
flag)
$ python -m ai.backend.web.server
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file backend_ai_webserver-24.9.1.tar.gz
.
File metadata
- Download URL: backend_ai_webserver-24.9.1.tar.gz
- Upload date:
- Size: 16.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60547d24996a7ac9b8ba689bcf7034527dce45a90a748d1d83476e9896ffc759 |
|
MD5 | 0aa83963b72b3a25b1607cc307719eec |
|
BLAKE2b-256 | 9dcc202dc934b083202558a8d5d1765fbe5ad7d36f78f49419f7dc07226e9088 |
File details
Details for the file backend.ai_webserver-24.9.1-py3-none-any.whl
.
File metadata
- Download URL: backend.ai_webserver-24.9.1-py3-none-any.whl
- Upload date:
- Size: 17.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcf22f3a93817cfb260d442c802c5501e89a7fdbd3631be3935e2c5770e04902 |
|
MD5 | 4764823f534baec71c67f1e77c78d2a1 |
|
BLAKE2b-256 | b29c7b279e062bd3426664b2400163b7258fa783580c817f5507c8cefa930331 |