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
backend.ai-manager-19.3.0.tar.gz
(68.3 kB
view hashes)
Built Distribution
Close
Hashes for backend.ai-manager-19.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58ff3e4708fae792ee9ea4a74bf6f09e95c4d681116cb7cffd0152023b5761b2 |
|
MD5 | 87df7398d9f3446d0ce08e9c51781eba |
|
BLAKE2b-256 | d4ddcadcc33337a5808c6bcc88d2da7d93effd72c32231de81dc719155f079ee |
Close
Hashes for backend.ai_manager-19.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8ddc7cc4d35cf3c3e0cf5a0c8a95a2e0746d3d110445784aaac3006d03205d4 |
|
MD5 | 48a0303d747171fb3d11c8c573aff91b |
|
BLAKE2b-256 | 7ba1b419ebdec98d4dcc93c0b5121ef15a255f8df319116cece9cfef7bf41e55 |