Server Runtime
Use this sub-skill when the user needs to run or configure the CLIP-as-service server package (clip_server) or diagnose backend/model service startup.
Trigger examples
- "Start a CLIP-as-service server on CPU/GPU."
- "Write a Flow YAML for
clip_server with ONNX or TensorRT."
- "Use replicas, WebSocket/HTTP/gRPC, monitoring, TLS, or Docker."
- "Choose a model name and output dimension."
- "Debug missing ONNX Runtime, TensorRT, model download, OOM, or YAML issues."
Read first
- references/configuration.md for install commands,
python -m clip_server, Flow YAML, runtime parameters, scaling, protocol, monitoring, TLS, Docker, and environment variables.
- references/model-overview.md for supported model families, runtime support caveats, dimensions, image sizes, and model-selection notes.
- references/api-reference.md for verified executor/helper/tokenizer signatures and behavior that affects configs and troubleshooting.
- references/troubleshooting.md for backend ImportError, TensorRT/CUDA, ONNX custom model paths, model caches, OOM, and YAML failures.
- scripts/check_server_config.py to validate Flow YAML shape without starting the service.
- scripts/benchmark_client.py for a bounded benchmark against an already-running server.
- scripts/onnx_model_tools.py for optional ONNX fp16/quantization helpers.
Bundled Flow templates
- scripts/torch-flow.yml: PyTorch CLIPEncoder template.
- scripts/onnx-flow.yml: ONNX Runtime CLIPEncoder template.
- scripts/tensorrt-flow.yml: TensorRT CLIPEncoder template.
Copy a bundled template into the user's project and edit it there. Do not edit the skill-owned template in place.
Boundary routing
- If the task is to call
clip_client.Client against an already-running server, route to client-api.
- If the task is to add an AnnLite indexer, choose
n_dim, or operate a retrieval workspace, route to search-retrieval.
- If the task is generic deployment unrelated to CLIP-as-service, prefer a more appropriate service/deployment skill.
Minimal start commands
python -m clip_server # built-in PyTorch Flow
python -m clip_server torch-flow.yml # explicit PyTorch Flow
python -m clip_server onnx-flow.yml # built-in ONNX Flow after installing the ONNX extra
python -m clip_server tensorrt-flow.yml # built-in TensorRT Flow after TensorRT setup
The CLI accepts a Flow YAML path or -i to read YAML from standard input. It does not expose arbitrary runtime flags; put model/backend/server settings in YAML.
Backend gate rule
- CPU or CUDA PyTorch can validate base server behavior.
- ONNX requires ONNX Runtime imports and model files/sessions.
- TensorRT requires CUDA, TensorRT Python/runtime packages, and engine build/load evidence. CPU checks do not verify TensorRT.
- Optional M-CLIP, CN-CLIP, search, and flash-attention dependencies must be installed only when selected by the user task.
Safe validation sequence
- Install only the needed package/extras.
- Validate imports with the root
scripts/check_install.py.
- Validate YAML statically with scripts/check_server_config.py.
- Start the server with a small model/config only when the user approves model downloads and long-running service startup.
- Use client-api
Client.profile() from the caller side before large requests.
1---2name: server-runtime3description: "Guides clip_server installation, Jina Flow YAML,4 PyTorch/ONNX/TensorRT runtime selection, scaling, deployment, and backend5 troubleshooting."6disable-model-invocation: true7metadata:8 source: https://skillmd.com/skills/vectorspacelab/server-runtime9 disco-role: operating10license: NOASSERTION11---1213# Server Runtime1415Use this sub-skill when the user needs to run or configure the CLIP-as-service server package (`clip_server`) or diagnose backend/model service startup.1617## Trigger examples1819- "Start a CLIP-as-service server on CPU/GPU."20- "Write a Flow YAML for `clip_server` with ONNX or TensorRT."21- "Use replicas, WebSocket/HTTP/gRPC, monitoring, TLS, or Docker."22- "Choose a model name and output dimension."23- "Debug missing ONNX Runtime, TensorRT, model download, OOM, or YAML issues."2425## Read first2627- [references/configuration.md](references/configuration.md) for install commands, `python -m clip_server`, Flow YAML, runtime parameters, scaling, protocol, monitoring, TLS, Docker, and environment variables.28- [references/model-overview.md](references/model-overview.md) for supported model families, runtime support caveats, dimensions, image sizes, and model-selection notes.29- [references/api-reference.md](references/api-reference.md) for verified executor/helper/tokenizer signatures and behavior that affects configs and troubleshooting.30- [references/troubleshooting.md](references/troubleshooting.md) for backend ImportError, TensorRT/CUDA, ONNX custom model paths, model caches, OOM, and YAML failures.31- [scripts/check_server_config.py](scripts/check_server_config.py) to validate Flow YAML shape without starting the service.32- [scripts/benchmark_client.py](scripts/benchmark_client.py) for a bounded benchmark against an already-running server.33- [scripts/onnx_model_tools.py](scripts/onnx_model_tools.py) for optional ONNX fp16/quantization helpers.3435## Bundled Flow templates3637- [scripts/torch-flow.yml](scripts/torch-flow.yml): PyTorch CLIPEncoder template.38- [scripts/onnx-flow.yml](scripts/onnx-flow.yml): ONNX Runtime CLIPEncoder template.39- [scripts/tensorrt-flow.yml](scripts/tensorrt-flow.yml): TensorRT CLIPEncoder template.4041Copy a bundled template into the user's project and edit it there. Do not edit the skill-owned template in place.4243## Boundary routing4445- If the task is to call `clip_client.Client` against an already-running server, route to [client-api](../client-api/SKILL.md).46- If the task is to add an AnnLite indexer, choose `n_dim`, or operate a retrieval workspace, route to [search-retrieval](../search-retrieval/SKILL.md).47- If the task is generic deployment unrelated to CLIP-as-service, prefer a more appropriate service/deployment skill.4849## Minimal start commands5051```bash52python -m clip_server # built-in PyTorch Flow53python -m clip_server torch-flow.yml # explicit PyTorch Flow54python -m clip_server onnx-flow.yml # built-in ONNX Flow after installing the ONNX extra55python -m clip_server tensorrt-flow.yml # built-in TensorRT Flow after TensorRT setup56```5758The CLI accepts a Flow YAML path or `-i` to read YAML from standard input. It does not expose arbitrary runtime flags; put model/backend/server settings in YAML.5960## Backend gate rule6162- CPU or CUDA PyTorch can validate base server behavior.63- ONNX requires ONNX Runtime imports and model files/sessions.64- TensorRT requires CUDA, TensorRT Python/runtime packages, and engine build/load evidence. CPU checks do not verify TensorRT.65- Optional M-CLIP, CN-CLIP, search, and flash-attention dependencies must be installed only when selected by the user task.6667## Safe validation sequence68691. Install only the needed package/extras.702. Validate imports with the root `scripts/check_install.py`.713. Validate YAML statically with [scripts/check_server_config.py](scripts/check_server_config.py).724. Start the server with a small model/config only when the user approves model downloads and long-running service startup.735. Use [client-api](../client-api/SKILL.md) `Client.profile()` from the caller side before large requests.