Skip to content

Commit

Permalink
Merge pull request #164 from jupyter-naas/155-update-abi-readmemd
Browse files Browse the repository at this point in the history
feat: setup local install on abi
  • Loading branch information
FlorentLvr authored Jul 23, 2024
2 parents 77a76da + 2ed94ee commit 501c93b
Show file tree
Hide file tree
Showing 66 changed files with 3,538 additions and 2,457 deletions.
19 changes: 12 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Jupyter Notebook
.ipynb_checkpoints
*Untitled.ipynb

# Data
.csv
.xlsx
.json
.parquet
.logs
*.csv
*.xlsx
*.json
*.parquet
*.logs

# Models<
# Models
pipeline_executions

# Outputs
Expand All @@ -19,4 +20,8 @@ __pycache__
.streamlit/secrets.toml
.env
.DS_Store
neo4j_data
neo4j_data
.abi-conda

# Entities + Secrets
config.secret.yml
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.defaultInterpreterPath": ".abi-config/bin/python"
}
92 changes: 92 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
define usage_str


░░ ░░░ ░░░ ░
▒ ▒▒▒▒ ▒▒ ▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒
▓ ▓▓▓▓ ▓▓ ▓▓▓▓▓▓ ▓▓▓▓
█ ██ ████ █████ ████
█ ████ ██ ███ █

Usage:
make all: Create the conda environment and install the ABI kernel
make conda-install-kernel: Install the ABI kernel in the conda environment
make conda-env-add package=<package>: Add a package to the conda environment
make conda-env-update: Update the conda environment
make conda-export: Export the conda environment to conda.yml
make windows-install-conda: Download and install Miniconda for Windows
make usage: Show this message


endef
export usage_str

# # Detect the operating system
# ifeq ($(OS),Windows_NT)
# OS_TYPE = Windows
# else
# UNAME_S := $(shell uname -s)
# ifeq ($(UNAME_S),Darwin)
# OS_TYPE = macOS
# else ifeq ($(UNAME_S),Linux)
# OS_TYPE = Linux
# else
# OS_TYPE = Unknown
# endif
# endif

# # Detect the architecture
# ifeq ($(OS_TYPE),Windows)
# ARCH := $(shell if exist "%ProgramFiles(x86)%" (echo 64-bit) else (echo 32-bit))
# else
# ARCH := $(shell uname -m)
# ifeq ($(ARCH),x86_64)
# ARCH = 64-bit
# else ifeq ($(ARCH),i686)
# ARCH = 32-bit
# else ifeq ($(ARCH),arm64)
# ARCH = arm64
# else ifeq ($(ARCH),aarch64)
# ARCH = 64-bit
# else
# ARCH = Unknown
# endif
# endif


.PHONY: all conda-install-kernel conda-export windows-install-conda
usage:
@echo "$$usage_str"

# Setup
# CONDA_EXISTS := $(shell if command -v conda >/dev/null 2>&1; then echo yes; else echo no; fi)
# setup:
# @ if [ "$(OS_TYPE)" == "Windows" ] && [ "$(CONDA_EXISTS)" == "no" ]; then \
# make windows-install-conda; \
# fi

# @ if [ "$(OS_TYPE)" == "macOS" ] && [ "$(CONDA_EXISTS)" == "no" ]; then \
# make macos-install-conda; \
# fi

all: conda-install-kernel

.abi-conda:
conda env create -f conda.yml --prefix .abi-conda

conda-env-add:
conda run -p .abi-conda pip install $(package)

conda-env-update:
conda env update --file conda.yml --prune -p .abi-conda

conda-install-kernel: .abi-conda
conda run -p .abi-conda python -m ipykernel install --user --name abi --display-name "abi"
conda run -p .abi-conda jupyter kernelspec install --user .abi-conda/share/jupyter/kernels/python3/

conda-export:
conda run -p .abi-conda conda env export --no-builds | grep -v "^prefix: " > conda.yml

windows-install-conda:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
![Naas.ai - Open Source Data Platform](assets/project_logo.png)

# ABI*: The AI system for your everyday business

*Augmented Business Intelligence

---

<img src="./assets/abi-flywheel.png" width="50%" height="50%">
<img src="./assets/abi-flywheel.png" width="100%" height="100%">

## Mixture of Assistants[](https://docs.naas.ai/usage/abi/introduction#mixture-of-assistants)

Expand Down Expand Up @@ -281,9 +276,13 @@ This feature is currently available exclusively on Naas Lab for Pro users.

We are working to make it possible to run it locally.

- Duplicate our [Google Sheets spreadsheet model](https://docs.google.com/spreadsheets/d/1uHxnHhu3BIYYcUTfrmnJabWtKbGhhdaUUTpdG9WVg1M/edit?usp=sharing)
- Share your Google Sheets spreadsheet with our service account : 🔗 [email protected]
- Set "ENTITY" spreadsheet with your information
- Clone repo https://github.com/jupyter-naas/abi.git
- Execute `setup.ipynb`
- Run `__pipeline__.ipynb`
- Deploy to production `push_to_production.ipynb` (only on Naas Cloud)

### Build Your Own ABI

Expand Down
Loading

0 comments on commit 501c93b

Please sign in to comment.