Dispor is an experimental tracking and deployment platform that containerizes machine learning models into live microservices instantly. It combines model registry features with immediate inference endpoints, simplifying the transition from training to serving.
- Instant Deployment: Models are containerized and served as API endpoints upon deployment.
- Python SDK: Simple configuration and deployment interface.
- Go Backend: High-performance API gateway and Docker orchestration.
- React UI: Dashboard for managing models, viewing version history, and testing inference.
- Hot-Loading: Automatic container management for efficient resource usage.
Install the Python SDK directly from the repository:
pip install git+https://github.com/deepto98/dispor.git#subdirectory=sdkInitialize the client with your backend host and API key.
import dispor
from sklearn.linear_model import LinearRegression
dispor.config = {
"api_key": "your-api-key",
"host": "http://localhost:8080"
}Train your model as usual, then deploy it with a single function call.
# Train a standard scikit-learn model
model = LinearRegression()
model.fit(X_train, y_train)
# Deploy to Dispor
run_id = dispor.deploy(
model=model,
name="house-price-predictor",
version_desc="v1 with robust scaling",
input_example=[{"SquareFootage": 2500, "NumBedrooms": 3}]
)
print(f"Model deployed with Run ID: {run_id}")Once deployed, the model is available as a REST endpoint. You can query it via the dashboard or programmatically.
curl -X POST http://localhost:8080/api/v1/predict/<run_id> \
-H "x-api-key: your-api-key" \
-H "Content-Type: application/json" \
-d '[{"SquareFootage": 3000, "NumBedrooms": 4}]'Dispor is designed to be deployed as a single binary on a Linux VPS with Docker access.
- Build the frontend (
npm run build). - Copy frontend assets to
backend/public. - Build the Go backend (
go build). - Run the binary on a server with access to
/var/run/docker.sock.
See Deployment.md for detailed instructions.