Backend.AI Manager
Project description
Backend.AI Manager with API Gateway
Package Structure
ai.backend
manager
: Abstraction of agents and computation kernelsgateway
: User and Admin API (REST/GraphQL) gateway based on aiohttp
Installation
Please visit the installation guides.
For development
Prerequisites
libnsappy-dev
orsnappy-devel
system package depending on your distro- Python 3.6 or higher with pyenv and pyenv-virtualenv (optional but recommneded)
- Docker 17.03 or later with docker-compose (18.03 or later is recommended)
Clone the meta repository and install a "halfstack" configuration. The halfstack configuration installs and runs dependency daemons such as etcd in the background.
~$ git clone https://github.com/lablup/backend.ai halfstack
~$ cd halfstack
~/halfstack$ docker-compose -f docker-compose.halfstack.yml up -d
Then prepare the source clone of the agent as follows. First install the current working copy.
~$ git clone https://github.com/lablup/backend.ai-manager manager
~$ cd manager
~/manager$ pyenv virtualenv venv-manager
~/manager$ pyenv local venv-manager
~/manager (venv-manager) $ pip install -U pip setuptools # ensure latest versions
~/manager (venv-manager) $ pip install -U -r requirements-dev.txt
With the halfstack, you can run the agent simply like (note that you need a working manager running with the halfstack already):
~/manager (venv-manager) $ scripts/run-with-halfstack.sh python -m ai.backend.gateway.server --debug
To develop and debug, configure the manager as follows:
~/manager (venv-manager) $ scripts/run-with-halfstack.sh backend.ai-manager etcd put vfolder/_mount /mnt
~/manager (venv-manager) $ scripts/run-with-halfstack.sh backend.ai-manager etcd update-images -f sample-configs/image-metadata.yml
~/manager (venv-manager) $ scripts/run-with-halfstack.sh backend.ai-manager etcd update-aliases -f sample-configs/image-aliases.yml
~/manager (venv-manager) $ cp alembic.ini.sample alembic.ini
~/manager (venv-manager) $ edit alembic.ini # match the config with the halfstack
~/manager (venv-manager) $ scripts/run-with-halfstack.sh backend.ai-manager schema oneshot head
~/manager (venv-manager) $ scripts/run-with-halfstack.sh backend.ai-manager fixture populate example_keypair
To run tests:
~/manager (venv-manager) $ scripts/run-with-halfstack.sh python -m pytest -m 'not integration'
To run tests including integration tests, you first need to install the agent in the same virtualenv.
~$ git clone https://github.com/lablup/backend.ai-agent agent
~$ cd manager
~/manager (venv-manager) $ pip install -e ../agent
~/manager (venv-manager) $ scripts/run-with-halfstack.sh python -m pytest
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-manager-19.6.0a1.tar.gz
.
File metadata
- Download URL: backend.ai-manager-19.6.0a1.tar.gz
- Upload date:
- Size: 77.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0291813e4b54e0c250db912f2a1d0374efb25a5ccff09fcd3b81285dfb32c33 |
|
MD5 | a36497826213b370d2d16284795f713d |
|
BLAKE2b-256 | 796bbe0e6bb3b5eaff0cb727fe7267efe3f1d7dac462dc7bed7cf67508ea7db8 |
Provenance
File details
Details for the file backend.ai_manager-19.6.0a1-py3-none-any.whl
.
File metadata
- Download URL: backend.ai_manager-19.6.0a1-py3-none-any.whl
- Upload date:
- Size: 100.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9238a88d05f6f6f7116ce549771aa9ed09fbd971f56719c3b8b12051cc611c18 |
|
MD5 | ba51a6da69c4e339c0fef54b2668e53d |
|
BLAKE2b-256 | df849e4da7c0501e8aa2357ffcab928f543af57567a16963dee263f279f67b27 |