https://github.com/ai4bharat/dhruva-platform

Dhruva is an open-source platform for serving language AI models at scale.

https://github.com/ai4bharat/dhruva-platform

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.7%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Dhruva is an open-source platform for serving language AI models at scale.

Basic Info
  • Host: GitHub
  • Owner: AI4Bharat
  • License: mit
  • Language: TypeScript
  • Default Branch: master
  • Homepage: https://dhruva.ai4bharat.org
  • Size: 1.63 MB
Statistics
  • Stars: 21
  • Watchers: 9
  • Forks: 10
  • Open Issues: 4
  • Releases: 0
Created over 3 years ago · Last pushed 10 months ago
Metadata Files
Readme License

README.md

Dhruva

Table of Contents
  1. About The Project
  2. Getting Started
  3. Deployment
  4. Migrations
  5. Seed
  6. Contributing

About The Project

Dhruva is a full-fledged platform for serving AI models at scale.

(back to top)

Built With

  • Next
  • Chakra UI
  • FastApi
  • Celery

(back to top)

Getting Started

Prerequisites

Get the .env file. This can be created from the .env.example, you just need to fill the values.

(back to top)

Installation

Clone both Dhruva-Platform and Dhruva-Seed.

git clone --recurse-submodules https://github.com/AI4Bharat/Dhruva-Platform

git clone https://github.com/AI4Bharat/Dhruva-Seed

Place the .env file in the root directory in Dhruva Platform

(back to top)

Deployment

Development

  • Build the docker images for both the server and the client using the commands below.

docker build -f Dockerfile -t server .

docker build -f Dockerfile -t client .

  • Build the docker image for the seed repository

docker build -t seed .

  • Run docker compose by using the docker-compose-db.yml, docker-compose-metering.yml and docker-compose-monitoring.yml as the compose files first.

docker compose -f docker-compose-db.yml up -d

docker compose -f docker-compose-metering.yml up -d

docker compose -f docker-compose-monitoring.yml up -d

  • Finally run docker compose with the docker-compose-app.yml file as the compose file. docker compose -f docker-compose-app.yml up -d

You should now be able to view the client at http://localhost:{$FRONTEND_PORT}. The server will be accessible at http://localhost:{$BACKEND_PORT}, with $FRONTEND_PORT and $BACKEND_PORT being the values set in the .env file.

(back to top)

Migrations

We use mongodb-migrations to manage migrations. All migrations are stored in the migrations folder.

To create a new migration, run the following command:

mongodb-migrate-create --description <description>

This command will create a new migration <timestamp>_<description>.py in the migrations folder. A class Migration will be created for you. Implement the upgrade method, and optionally, the downgrade method.

Once implemented, you can run docker compose with docker-compose-app.yml as the compose file to run the migration.

After the migration is run, it will also add a new document in the migrations collection, in the database specified in the .env file, to ensure that each the migration only runs once.

Commit all migrations to the repository and do not delete any migration.

(back to top)

Testing

To perform testing of the models hosted on Dhruva, please refer to the Dhruva-Evaluation-Suite repository.

  • Functional testing allows users to easily benchmark their models after setting up on Dhruva against any dataset available on HuggingFace, with any metrics such as WER (for ASR), BleU (for NMT) and others.
  • Users can also benchmark inference speeds of all endpoints and measure the Requests/sec rate using the Performance Testing tool

    (back to top)

Contributing

  1. Clone the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Owner

  • Name: AI4Bhārat
  • Login: AI4Bharat
  • Kind: organization
  • Email: opensource@ai4bharat.org
  • Location: India

Artificial-Intelligence-For-Bhārat : Building open-source AI solutions for India!

GitHub Events

Total
  • Issues event: 1
  • Watch event: 5
  • Push event: 3
  • Fork event: 5
  • Create event: 1
Last Year
  • Issues event: 1
  • Watch event: 5
  • Push event: 3
  • Fork event: 5
  • Create event: 1

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 4
  • Total pull requests: 96
  • Average time to close issues: 15 days
  • Average time to close pull requests: 17 days
  • Total issue authors: 4
  • Total pull request authors: 10
  • Average comments per issue: 0.75
  • Average comments per pull request: 0.04
  • Merged pull requests: 88
  • Bot issues: 0
  • Bot pull requests: 8
Past Year
  • Issues: 1
  • Pull requests: 6
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 minute
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.17
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 6
Top Authors
Issue Authors
  • ryback123 (1)
  • Rajesh-bommalla (1)
  • phxgbl (1)
  • sokumon (1)
Pull Request Authors
  • ryback123 (45)
  • inferno080 (16)
  • dependabot[bot] (8)
  • Rugz007 (7)
  • ashwin-014 (7)
  • GokulNC (5)
  • Shanks0465 (5)
  • VedhaSankar (1)
  • suhaas-d (1)
  • jagadeesh6jaga (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (8) python (6) javascript (2)

Dependencies

client/Dockerfile docker
  • node lts-alpine build
docker-compose-app.yml docker
  • client latest
  • seed latest
  • server latest
docker-compose-db.yml docker
  • adicom/admin-mongo latest
  • bitnami/mongodb 4.2.0
  • redis latest
docker-compose-metering.yml docker
  • rabbitmq 3-management
  • server latest
  • timescale/timescaledb-ha pg15-latest
docker-compose-monitoring.yml docker
  • ghcr.io/zapier/prom-aggregation-gateway v0.7.0
  • grafana/grafana 9.4.3
  • prom/prometheus v2.37.6
server/Dockerfile docker
  • python 3.10 build
client/package.json npm
  • @ai4bharat/indic-transliterate ^1.2.15
  • @chakra-ui/icons ^2.0.17
  • @chakra-ui/react ^2.4.6
  • @emotion/react ^11.10.5
  • @emotion/styled ^11.10.5
  • @next/font 13.1.1
  • @project-sunbird/open-speech-streaming-client https://github.com/AI4Bharat/speech-recognition-open-api-client.git#dhruva
  • @tanstack/react-query ^4.24.6
  • @tanstack/react-query-devtools ^4.24.6
  • @types/node 18.11.18
  • @types/react 18.0.26
  • @types/react-dom 18.0.10
  • axios ^1.2.2
  • dotenv ^16.0.3
  • eslint 8.30.0
  • eslint-config-next 13.1.1
  • framer-motion ^8.1.4
  • next 13.1.1
  • react 18.2.0
  • react-datepicker ^4.14.1
  • react-dom 18.2.0
  • react-icons ^4.7.1
  • typescript 4.9.4
client/yarn.lock npm
  • 496 dependencies
server/requirements.txt pypi
  • FastAPI-SQLAlchemy ==0.2.1
  • PyYAML ==6.0
  • SQLAlchemy ==2.0.19
  • anyio ==3.6.2
  • argon2-cffi ==21.3.0
  • autopep8 ==2.0.1
  • azure-identity ==1.12.0
  • azure-storage-blob ==12.16.0
  • bidict ==0.22.1
  • celery ==5.2.7
  • celery-flower ==1.0.1
  • certifi ==2022.12.7
  • charset-normalizer ==3.0.1
  • click ==8.1.3
  • fastapi ==0.93.0
  • gevent ==22.10.2
  • h11 ==0.14.0
  • httptools ==0.5.0
  • idna ==3.4
  • jsonpickle ==3.0.1
  • mongodb-migrations ==1.2.1
  • motor ==3.1.1
  • numpy ==1.24.1
  • prometheus-client ==0.15.0
  • prometheus-fastapi-instrumentator ==5.9.1
  • psycopg2 ==2.9.6
  • pycodestyle ==2.10.0
  • pydantic ==1.10.4
  • pydub ==0.25.1
  • pyjwt ==2.6.0
  • pymongo ==4.3.3
  • python-dotenv ==0.21.0
  • python-engineio ==4.3.4
  • python-socketio ==5.7.2
  • python-ulid ==1.1.0
  • redis-om ==0.1.2
  • requests ==2.28.2
  • scipy ==1.10.0
  • sniffio ==1.3.0
  • soundfile ==0.12.1
  • sqlalchemy-timescaledb ==0.4.1
  • starlette ==0.25.0
  • starlette_exporter ==0.15.1
  • tomli ==2.0.1
  • torch ==2.0.0
  • torchaudio ==2.0.1
  • tritonclient ==2.23.0
  • typing_extensions ==4.4.0
  • urllib3 ==1.26.14
  • uvicorn ==0.20.0
  • uvloop ==0.17.0
  • watchfiles ==0.18.1
  • webrtcvad ==2.0.10
  • websockets ==10.4
  • yt-dlp >=2023.3.4