Skip to content

Commit

Permalink
Merge branch 'main' into add-redis-check
Browse files Browse the repository at this point in the history
  • Loading branch information
varungupta authored and varungupta committed Sep 13, 2024
2 parents c1fd311 + 5f590ae commit 65addf4
Show file tree
Hide file tree
Showing 37 changed files with 978 additions and 107 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ __pycache__
# Jupyter notebook
.ipynb_checkpoints/

# Sphinx documentation
docs/build/
!**/*.template.rst

2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ linters:
- lll
- misspell
- nakedret
- prealloc
# - prealloc
- staticcheck
- typecheck
- unconvert
Expand Down
27 changes: 27 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.10"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
formats:
- pdf

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements-docs.txt
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ kubectl create -k config/dependency
kubectl apply -k config/default
```

Install stable distribution
```shell
# Note: this command will be available after the repo going public

# Install component dependencies
kubectl create -k "github.com/aibrix/aibrix/config/dependency"
kubectl create -k "github.com/aibrix/aibrix/config/dependency?ref=v0.1.0-rc.1"

# Install aibrix components
kubectl apply -k "github.com/aibrix/aibrix/config/default"
kubectl apply -k "github.com/aibrix/aibrix/config/default?ref=v0.1.0-rc.1"
```

## Documentation
Expand Down
13 changes: 11 additions & 2 deletions api/orchestration/v1alpha1/rayclusterreplicaset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
// Since RayClusterReplicaSet design principle is high similar to upstream ReplicaSet, most of the spec api fields are
// from upstream codes. The only difference is it manages the RayCluster template instead of pod template.
// The other thing to notice is some of the advanced feature of replicaset may not be supported here.

// RayClusterReplicaSetSpec defines the desired state of RayClusterReplicaSet
type RayClusterReplicaSetSpec struct {
Expand Down Expand Up @@ -83,6 +84,14 @@ type RayClusterReplicaSetStatus struct {
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"`
}

// These are valid conditions of a replica set.
const (
// RayClusterReplicaSetReplicaFailure is added in a replica set when one of its ray cluster fails to be created
// due to insufficient quota, limit ranges, pod security policy, node selectors, etc. or deleted
// due to kubelet being down or finalizers are failing.
RayClusterReplicaSetReplicaFailure string = "ReplicaFailure"
)

// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
Expand Down
26 changes: 26 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,29 @@ rules:
- get
- patch
- update
- apiGroups:
- ray.io
resources:
- rayclusters
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ray.io
resources:
- rayclusters/finalizers
verbs:
- update
- apiGroups:
- ray.io
resources:
- rayclusters/status
verbs:
- get
- patch
- update
3 changes: 1 addition & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
Make sure that your python conda environment is setup correctly. The following installs sphinx package and necessary templates.

```bash
pip install sphinx==8.0.2
pip install sphinx-book-theme==1.1.3
pip install -r requirements-docs.txt
```

## Compile html pages
Expand Down
8 changes: 8 additions & 0 deletions docs/requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
sphinx==8.0.2
sphinx-book-theme==1.1.3
sphinx-click==6.0.0
sphinx-copybutton==0.5.2
sphinx-togglebutton==0.3.2
sphinxemoji==0.3.1
sphinx-autodoc-typehints==2.4.1
sphinx_design==0.6.1
File renamed without changes
7 changes: 7 additions & 0 deletions docs/source/community/community.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _community:

=========
Community
=========

TODO
60 changes: 54 additions & 6 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,76 @@

project = 'AIBrix'
copyright = '2024, AIBrix Team'
author = 'AIBrix Team'
release = '0.1.0'
author = 'the AIBrix Authors'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = []
extensions = [
'sphinxemoji.sphinxemoji',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.duration',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx_autodoc_typehints',
'sphinx_click',
'sphinx_copybutton',
'sphinx_design',
]

templates_path = ['_templates']
exclude_patterns = []


# Exclude the prompt "$" when copying code
copybutton_prompt_text = r"\$ "
copybutton_prompt_is_regexp = True


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_title = project
html_theme = 'sphinx_book_theme'
html_logo = 'assets/logos/aibrix-logo-light.png'
html_static_path = ['_static']
html_theme_options = {
# repository level setting
'repository_url': 'https://github.com/aibrix/aibrix',
"use_repository_button": True,
"repository_branch": "main",
'path_to_docs': 'docs/source',

# theme
'pygment_light_style': 'tango',
'pygment_dark_style': 'monokai',


html_theme_options = {
'navigation_depth': 4,
# navigation and sidebar
'show_toc_level': 2,
'announcement': None,
'secondary_sidebar_items': [
'page-toc',
],
'navigation_depth': 3,
'primary_sidebar_end': [],

# article

# footer
'footer_start': [],
'footer_center': [],
'footer_end': [],
}

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"typing_extensions":
("https://typing-extensions.readthedocs.io/en/latest", None),
"pillow": ("https://pillow.readthedocs.io/en/stable", None),
"numpy": ("https://numpy.org/doc/stable", None),
"torch": ("https://pytorch.org/docs/stable", None),
"psutil": ("https://psutil.readthedocs.io/en/stable", None),
}
7 changes: 7 additions & 0 deletions docs/source/designs/architecture.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _architecture:

====================
Overall Architecture
====================

TODO
7 changes: 7 additions & 0 deletions docs/source/development/contribution.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _contribution:

============
Contribution
============

TODO
7 changes: 7 additions & 0 deletions docs/source/features/autoscaling.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _autoscaling:

===========
Autoscaling
===========

TODO
7 changes: 7 additions & 0 deletions docs/source/features/gateway-plugins.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _gateway:

===============
Gateway Routing
===============

TODO
7 changes: 7 additions & 0 deletions docs/source/features/lora-dynamic-loading.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _lora:

====================
Lora Dynamic Loading
====================

TODO
7 changes: 7 additions & 0 deletions docs/source/features/multi-node-inference.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _distributed_inference:

====================
Multi-Node Inference
====================

TODO
7 changes: 7 additions & 0 deletions docs/source/features/runtime.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _ai_runtime:

==========
AI Runtime
==========

TODO
6 changes: 0 additions & 6 deletions docs/source/getstarted/quickstart.rst

This file was deleted.

7 changes: 7 additions & 0 deletions docs/source/getting_started/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _installation:

============
Installation
============

This section contains how to install the packages.
31 changes: 31 additions & 0 deletions docs/source/getting_started/quickstart.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.. _quickstart:

==========
Quickstart
==========


To get started with AIBrix, clone `aibrix/aibrix` repository, and install the manifests.
.. note::
This is the latest version which is not very stable, take your risk.

.. code:: bash
# Local Testing
git clone https://github.com/aibrix/aibrix.git
cd aibrix
# Install component dependencies
kubectl create -k config/dependency
# Install aibrix components
kubectl apply -k config/default
Install stable distribution.

.. code:: bash
# Install component dependencies
kubectl create -k "github.com/aibrix/aibrix/config/dependency?ref=v0.1.0-rc.1"
# Install aibrix components
kubectl apply -k "github.com/aibrix/aibrix/config/default?ref=v0.1.0-rc.1"
Loading

0 comments on commit 65addf4

Please sign in to comment.