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.0.tar.gz
(11.0 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.0.tar.gz.
File metadata
- Download URL: ingrain-0.2.0.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e69d4e46a22ff45c3d57c4585882ea93f306fd7cd47603629bf07ac0aabb7f4
|
|
| MD5 |
7eb376790387eec681aab406917afd9f
|
|
| BLAKE2b-256 |
a9b55e25ac54a77c3b791e78d53d20698b32d8c250d2888dc3be7cbdbfb3ed6a
|
File details
Details for the file ingrain-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ingrain-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b964c6b070ede5bf88696d44c38cf8c980a07a22bbb751bc67bcfb7b1a944d77
|
|
| MD5 |
3e1a1016c4feea10e12e984f02714638
|
|
| BLAKE2b-256 |
465c778c46db766043db41cadf0a255d054d1748cd0762957a8780d6c3e3f1df
|