Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 72 additions & 2 deletions quick-start/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.8'

# BharatML Stack Application Versions
# To test different versions, set environment variables:
# ONFS_VERSION=v1.2.3 HORIZON_VERSION=v2.1.0 NUMERIX_VERSION=v1.0.0 TRUFFLEBOX_VERSION=v1.0.5 INFERFLOW_VERSION=v1.0.0 docker-compose up
Expand Down Expand Up @@ -954,6 +952,78 @@ services:
start_period: 10s
restart: "no"

# gRPC Proxy - nginx routes every RPC to the correct backend service
# Uses Docker's embedded DNS resolver (127.0.0.11) so nginx starts even when
# individual gRPC services are not running; a 502 is returned for those methods.
grpc-proxy:
image: nginx:latest
container_name: grpc-proxy
volumes:
- ./nginx/grpc-proxy.conf:/etc/nginx/nginx.conf:ro
- ./nginx/index.html:/usr/share/nginx/grpcui-helper/index.html:ro
ports:
- "9000:9000"
- "8097:80"
networks:
onfs-network:
ipv4_address: 172.18.0.33
restart: unless-stopped

# Single gRPC UI - connects to grpc-proxy and loads all service proto files.
# Pre-filled request metadata: x-auth-token and caller-id headers.
# Sample request bodies are mounted at /samples/<service>/<MethodName>.json
grpcui:
image: fullstorydev/grpcui:latest
container_name: grpcui
command:
- -plaintext
- -port
- "8080"
- -bind
- 0.0.0.0
- -import-path
- /protos/onfs
- -import-path
- /protos/numerix
- -import-path
- /protos/inferflow
- -import-path
- /protos/skye
- -import-path
- /protos/predator
- -proto
- retrieve.proto
- -proto
- persist.proto
- -proto
- numerix.proto
- -proto
- inferflow.proto
- -proto
- predict.proto
- -proto
- skye.proto
- -proto
- grpc_service.proto
- -proto
- health.proto
- grpc-proxy:9000
Comment thread
shubhamk-meesho marked this conversation as resolved.
volumes:
- ./protos/onfs:/protos/onfs:ro
- ./protos/numerix:/protos/numerix:ro
- ./protos/inferflow:/protos/inferflow:ro
- ./protos/skye:/protos/skye:ro
- ./protos/predator:/protos/predator:ro
- ./grpc-samples:/samples:ro
ports:
- "8096:8080"
networks:
onfs-network:
ipv4_address: 172.18.0.34
depends_on:
- grpc-proxy
restart: unless-stopped

# Optional: Management Tools
kafka-ui:
image: provectuslabs/kafka-ui:latest
Expand Down
31 changes: 31 additions & 0 deletions quick-start/grpc-samples/inferflow/InferPairWise.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"modelConfigId": "pairwise_ranking_v1",
"trackingId": "tracking_test_003",
"contextFeatures": [
{
"name": "user_id",
"dataType": "DataTypeString",
"value": "dXNlcl8wMDE=",
"vectorDim": 0
}
],
"targetInputSchema": [
{ "name": "price", "dataType": "DataTypeFP32", "vectorDim": 0 },
{ "name": "rating", "dataType": "DataTypeFP32", "vectorDim": 0 }
],
"pairInputSchema": [
{ "name": "pair_affinity", "dataType": "DataTypeFP32", "vectorDim": 0 }
],
"targets": [
{ "id": "product_101", "featureValues": ["AAAAAA==", "AAAAAA=="] },
{ "id": "product_202", "featureValues": ["AAAAAA==", "AAAAAA=="] }
],
"pairs": [
{
"firstTargetIndex": 0,
"secondTargetIndex": 1,
"featureValues": ["AAAAAA=="]
}
],
"tenantId": "tenant_test"
}
28 changes: 28 additions & 0 deletions quick-start/grpc-samples/inferflow/InferPointWise.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"modelConfigId": "pointwise_ranking_v1",
"trackingId": "tracking_test_002",
"contextFeatures": [
{
"name": "user_id",
"dataType": "DataTypeString",
"value": "dXNlcl8wMDE=",
"vectorDim": 0
}
],
"targetInputSchema": [
{ "name": "price", "dataType": "DataTypeFP32", "vectorDim": 0 },
{ "name": "rating", "dataType": "DataTypeFP32", "vectorDim": 0 },
{ "name": "category", "dataType": "DataTypeString", "vectorDim": 0 }
],
"targets": [
{
"id": "product_101",
"featureValues": ["AAAAAA==", "AAAAAA==", ""]
},
{
"id": "product_202",
"featureValues": ["AAAAAA==", "AAAAAA==", ""]
}
],
"tenantId": "tenant_test"
}
16 changes: 16 additions & 0 deletions quick-start/grpc-samples/inferflow/RetrieveModelScore.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"entities": [
{
"entity": "product",
"ids": ["product_101", "product_202", "product_303"],
"features": [
{
"name": "user_context",
"idsFeatureValue": ["user_001"]
}
]
}
],
"modelConfigId": "ranking_model_v1",
"trackingId": "tracking_test_001"
}
24 changes: 24 additions & 0 deletions quick-start/grpc-samples/numerix/Compute.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"entityScoreData": {
"schema": ["user_id", "item_id"],
"computeId": "dot_product_v1",
"dataType": "fp32",
"entityScores": [
{
"stringData": {
"values": ["user_001", "item_101"]
}
},
{
"stringData": {
"values": ["user_001", "item_202"]
}
},
{
"stringData": {
"values": ["user_002", "item_101"]
}
}
]
}
}
24 changes: 24 additions & 0 deletions quick-start/grpc-samples/onfs/PersistFeatures.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"entityLabel": "product",
"keysSchema": ["product_id"],
"featureGroupSchema": [
{ "label": "product_price_features_v1", "featureLabels": ["price", "rating"] },
{ "label": "product_inventory_features_v1", "featureLabels": ["stock_count"] }
],
"data": [
{
"keyValues": ["product_101"],
"featureValues": [
{ "values": { "fp64Values": [299.99, 4.5] } },
{ "values": { "int32Values": [120] } }
]
},
{
"keyValues": ["product_202"],
"featureValues": [
{ "values": { "fp64Values": [149.00, 3.8] } },
{ "values": { "int32Values": [45] } }
]
}
]
}
14 changes: 14 additions & 0 deletions quick-start/grpc-samples/onfs/RetrieveDecodedResult.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"entityLabel": "product",
"featureGroups": [
{
"label": "product_features_v1",
"featureLabels": ["price", "rating", "stock_count"]
}
],
"keysSchema": ["product_id"],
"keys": [
{ "cols": ["product_101"] },
{ "cols": ["product_202"] }
]
}
15 changes: 15 additions & 0 deletions quick-start/grpc-samples/onfs/RetrieveFeatures.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"entityLabel": "product",
"featureGroups": [
{
"label": "product_features_v1",
"featureLabels": ["price", "rating", "stock_count"]
}
],
"keysSchema": ["product_id"],
"keys": [
{ "cols": ["product_101"] },
{ "cols": ["product_202"] },
{ "cols": ["product_303"] }
]
}
18 changes: 18 additions & 0 deletions quick-start/grpc-samples/predator/ModelInfer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"modelName": "ranking_model",
"modelVersion": "1",
"id": "test_request_001",
"inputs": [
{
"name": "input_features",
"datatype": "FP32",
"shape": [1, 10],
"contents": {
"fp32Contents": [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]
}
}
],
"outputs": [
{ "name": "output" }
]
}
1 change: 1 addition & 0 deletions quick-start/grpc-samples/predator/ServerLive.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions quick-start/grpc-samples/predator/ServerMetadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"entity": "product",
"candidateIds": ["product_101", "product_202", "product_303"],
"embedding": [0.12, 0.34, 0.56, 0.78, 0.90, 0.11, 0.22, 0.33, 0.44, 0.55],
"modelName": "product_embedding_v1",
"variant": "ads_gold"
}
6 changes: 6 additions & 0 deletions quick-start/grpc-samples/skye/getEmbeddingsForCandidates.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"entity": "product",
"candidateIds": ["product_101", "product_202", "product_303"],
"modelName": "product_embedding_v1",
"variant": "ads_gold"
}
14 changes: 14 additions & 0 deletions quick-start/grpc-samples/skye/getSimilarCandidates.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"entity": "product",
"limit": 10,
"modelName": "product_embedding_v1",
"variant": "ads_gold",
"embeddings": [
{
"embedding": [0.12, 0.34, 0.56, 0.78, 0.90, 0.11, 0.22, 0.33, 0.44, 0.55]
}
],
"filters": [],
"globalFilters": { "filter": [] },
"attribute": []
}
Loading
Loading