Python client for the ingrain server
Project description
Ingrain Python Client
This is the Python client for the Ingrain API. It provides a simple interface to interact with the Ingrain API.
Install
pip install ingrain
Dev Setup
uv sync --dev
Testing
Unit tests
uv run pytest
Integration tests and unit tests
This requires that Ingrain Server is running. You can start it with Docker Compose:
services:
ingrain-models:
image: owenpelliott/ingrain-models:latest
container_name: ingrain-models
ports:
- "8687:8687"
environment:
- TRITON_GRPC_URL=triton:8001
- MAX_BATCH_SIZE=16
- MODEL_INSTANCES=1
- INSTANCE_KIND=KIND_GPU # Change to KIND_CPU if using a CPU
depends_on:
- triton
volumes:
- ./model_repository:/app/model_repository
- ${HOME}/.cache/huggingface:/app/model_cache/
ingrain-inference:
image: owenpelliott/ingrain-inference:latest
container_name: ingrain-inference
ports:
- "8686:8686"
environment:
- TRITON_GRPC_URL=triton:8001
depends_on:
- triton
volumes:
- ./model_repository:/app/model_repository
triton:
image: nvcr.io/nvidia/tritonserver:25.06-py3
container_name: triton
runtime: nvidia # Remove if using a CPU
environment:
- NVIDIA_VISIBLE_DEVICES=all
shm_size: "256m"
command: >
tritonserver
--model-repository=/models
--model-control-mode=explicit
ports:
- "8000:8000"
- "8001:8001"
- "8002:8002"
volumes:
- ./model_repository:/models
restart:
unless-stopped
uv run pytest --integration
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ingrain-0.2.3.tar.gz
(11.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ingrain-0.2.3.tar.gz.
File metadata
- Download URL: ingrain-0.2.3.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87763a46b0d796295fb9e9f8860f3361c80a6ea330b1ad42f8b34fdfe3cc502d
|
|
| MD5 |
8c28a47e576ebf56b977baacc1fe0610
|
|
| BLAKE2b-256 |
7471a44723ed87a2d430ab0c05f14124108b197dfec0080e5660c1ca1d91f93e
|
File details
Details for the file ingrain-0.2.3-py3-none-any.whl.
File metadata
- Download URL: ingrain-0.2.3-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70ec63a4c6837c8aa0b168031aa76d6af2172888a2409bad09c4764b99262821
|
|
| MD5 |
b1a7722af5cd1abc62abfce9d78b6e6b
|
|
| BLAKE2b-256 |
50ae63019447220f97f09148de892306719bffcbe4334e13e60fc5a33788ca15
|