https://github.com/detrin/model-deployment-example
Example of heavy model deployment with celery, redis and FastAPI, model kakaobrain/align-base is used.
https://github.com/detrin/model-deployment-example
celery deployment fastapi redis
Last synced: 2 months ago
JSON representation
Example of heavy model deployment with celery, redis and FastAPI, model kakaobrain/align-base is used.
- Host: GitHub
- URL: https://github.com/detrin/model-deployment-example
- Owner: detrin
- License: mit
- Created: 2025-02-07T21:30:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-07T22:28:53.000Z (over 1 year ago)
- Last Synced: 2025-05-14T05:23:41.054Z (about 1 year ago)
- Topics: celery, deployment, fastapi, redis
- Language: Python
- Homepage:
- Size: 2.45 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# model-deploymen-example
Example of heavy model deployment with celery and FastAPI, model kakaobrain/align-base is used.
## Usage
Set up docker containers
```
docker-compose up --build --scale worker=2
```
Set up the local env
```shell
uv venv --python=3.12
source .venv/bin/activate
uv pip install -r requirements_local.txt s
```
Test the deployed model
```shell
python3.12 test.py --image data/cat2.jpg --categories 'dog', 'cat'
ls data | xargs -P4 -I{} python3.12 test.py --image data/{} --categories 'dog', 'cat'
```