This repository can be containerized end-to-end for the SDK, CLI, examples, benchmarks, and package build flow.
It does not contain the upstream Aleatoric bridge server itself. The containerized surface here is:
hypercore-sdkCLI- runnable example scripts in
examples/ - benchmark and preflight tooling
- Python package build and validation
It does not deploy:
- the Hyperliquid public WebSocket service
- the Aleatoric gRPC bridge service
- any signing, trading, or custody infrastructure
The repo now ships a multi-stage Dockerfile:
runtime: installs the package and exposeshypercore-sdkdev: adds test/build tooling forpytest,mypy,build, andtwine
GitHub Actions CI now builds both targets on push/PR, and tagged releases publish the runtime image to GHCR.
Build locally:
cd /Users/jaws/research/dev/aleatoric/public/hypercore-python-sdk
docker build --target runtime -t hypercore-sdk:runtime .
docker build --target dev -t hypercore-sdk:dev .Do not bake secrets into the image. Pass them at runtime with shell environment or docker compose --env-file .env ....
Relevant variables include:
ALEATORIC_GRPC_TARGETALEATORIC_GRPC_SERVER_NAMEALEATORIC_GRPC_KEYRPC_GATEWAY_KEYRPC_KEYHYPER_API_KEYALEATORIC_MARKET_WS_KEYUNIFIED_STREAM_KEY
The example scripts still honor the same key alias logic implemented in hypercore_sdk/example_auth.py.
docker-compose.yml formalizes the common flows:
cli: run arbitraryhypercore-sdkcommandsws-console: live public WebSocket ladder + trades consolegrpc-console: live gRPCl2Book+tradesconsolebenchmark: feed latency benchmark with JSON output written to./artifactsvalidate: repo quality gates inside thedevimagepackage: build wheel/sdist into./dist
Examples:
cd /Users/jaws/research/dev/aleatoric/public/hypercore-python-sdk
docker compose run --rm cli price ws --coin BTC
docker compose --env-file .env run --rm ws-console
docker compose --env-file .env run --rm grpc-console --coin BTC --max-events 20
docker compose --env-file .env run --rm benchmark --coin BTC --runs 5 --skip-unified
docker compose run --rm validate
docker compose run --rm packageThese containers are outbound-only clients. No inbound ports are required.
If the gRPC endpoint is only reachable over VPN, the host VPN must already be connected before starting the container. On Docker Desktop, verify that container traffic can traverse the VPN; otherwise grpc-console will fail with StatusCode.UNAVAILABLE even if the same command works on the host shell.
For local/operator use:
- Build the
runtimeimage once. - Pass credentials with
docker compose --env-file .env. - Run
grpc-consoleorbenchmarkas short-lived jobs. - Use
validatein CI-equivalent checks before publishing package artifacts.
For automation:
- Keep this image as a client/tooling container.
- Treat the Aleatoric gRPC bridge and unified feeds as external dependencies.
- Monitor network/VPN reachability separately from SDK correctness.