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
Close
Hashes for backend.ai-manager-18.12.0a4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8626d4b512495b36b09fd05eb1e819d797eb390fee80fe7438d70559b72fc35 |
|
MD5 | 1059145da06809bcb80ffd598029739e |
|
BLAKE2b-256 | e94b2e69254eb8ba272dc2660d0c22292253d0166f042e3890007c392b6ffbb3 |
Close
Hashes for backend.ai_manager-18.12.0a4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7d6f6bd4b5c9b56722d9f8c9f693a81b6b70a3e4605d502fc0de50d7d58a2f8 |
|
MD5 | d75a1b3e29642445c09f013b58d9d720 |
|
BLAKE2b-256 | 100464836d10cb649587c07599c33a3b522001855c8f8b9ceb9d436965de5932 |