user avatar
update nodes scan script
冷俊杰 authored
ecb72c20

Infinite 2.0

The Infinite project is dedicated to making deployments of machine learning (ML) workflows on Kubernetes simple, portable and scalable.

Installation

To download the code and install, you can run the following shell commands:

    git clone http://gitlab.polixir.link/lengjunjie/infinite-2.0.git
    cd infinite-2.0
    pip install -e .[dev]

Getting started

This code is intended to be run locally by a single user. The server runs in python. You can implement your own gRPC clients using any language; a demo client written in python is provided to demonstrate the idea.

To start the server from the command line, run this:

    python -m infinite.server

Contributing

Setting up your development environment

OS requirements

  • Ubuntu Groovy 20.10
  • Ubuntu Focal 20.04 (LTS)

Install NVIDIA Driver

sudo apt install ubuntu-drivers-common
sudo ubuntu-drivers autoinstall
sudo reboot

Alternatively, install specific driver version

sudo apt install nvidia-driver-460

Install Docker

sudo snap install docker

Deploy Portainer in Docker

sudo docker volume create portainer_data
sudo docker run -d --restart=always -p 9000:9000 \
     -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data \
    --name=portainer portainer/portainer-ce

Deploy Rancher in Docker

sudo docker run --privileged -d --restart=unless-stopped -p 80:80 -p 443:443 \
    --name=rancher rancher/rancher

Install MicroK8s

sudo snap remove microk8s --purge
sudo snap install microk8s --classic --channel=latest/edge

sudo microk8s enable dns gpu storage

Add a label to a node

sudo microk8s kubectl label nodes infinite infinite.ai/node-type=Core-CoffeeLake_GTX1660Ti-Mobile

Import MicroK8s Cluster into Rancher

curl --insecure -sfL https://172.16.10.128/v3/import/tqqcq4xw62rbh96bpkqvsmvzsn86t7p7dn4wqk2b45bpz8swxnbj4l.yaml > rancher-agent.yaml

sudo microk8s kubectl apply -f rancher-agent.yaml

MicroK8s Docs

Installing behind a proxy

Installing Helm

sudo snap install helm3 --classic --channel=latest/edge

You should also have a local configured copy of kubectl to resolve issue 10.

Installing PostgreSQL

cd charts

helm dependency update ./bitnami/postgresql

helm install infinite-postgresql --set postgresqlPassword=secret,postgresqlDatabase=infinite \
    ./bitnami/postgresql

helm upgrade infinite-postgresql --set postgresqlPassword=secret,postgresqlDatabase=infinite \
    ./bitnami/postgresql

Optional: Installing pgAdmin

sudo docker run -d --restart=unless-stopped -p 5480:80 \
    -e PGADMIN_DEFAULT_EMAIL=postgres@pgadmin.org -e PGADMIN_DEFAULT_PASSWORD=secret \
    --name pgadmin4 dpage/pgadmin4

https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html

Installing Ray Operator

cd ray_operator
bash install_operator.sh

Testing

pytest ./tests

Optional

GUI Client for GRPC services

BloomRPC

Pull Request Checks

  • I've run pre-commit script to lint the changes in this PR.
  • I've included any doc changes needed for https://infinite.ai/master/.
  • I've made sure the tests are passing.