mirror of
https://github.com/clearml/clearml-docs
synced 2025-06-26 18:17:44 +00:00
Small edits (#861)
This commit is contained in:
@@ -52,11 +52,14 @@ and downloaded in realtime when updated
|
||||
|
||||
Spin the Inference Container
|
||||
- Customize container [Dockerfile](https://github.com/allegroai/clearml-serving/blob/main/clearml_serving/serving/Dockerfile) if needed
|
||||
- Build container `
|
||||
- Build container:
|
||||
|
||||
```bash
|
||||
docker build --tag clearml-serving-inference:latest -f clearml_serving/serving/Dockerfile .
|
||||
```
|
||||
|
||||
- Spin the inference container:
|
||||
|
||||
```bash
|
||||
docker run -v ~/clearml.conf:/root/clearml.conf -p 8080:8080 -e CLEARML_SERVING_TASK_ID=<service_id> -e CLEARML_SERVING_POLL_FREQ=5 clearml-serving-inference:latest
|
||||
```
|
||||
@@ -97,7 +100,8 @@ or with the `clearml-serving` CLI.
|
||||
In the [ClearML web UI](../webapp/webapp_overview.md), the new model is listed under the **Models** tab of its project.
|
||||
You can also download the model file itself directly from the web UI.
|
||||
|
||||
1. Register a new endpoint with the new model
|
||||
1. Register a new endpoint with the new model:
|
||||
|
||||
```bash
|
||||
clearml-serving --id <service_id> model add --engine sklearn --endpoint "test_model_sklearn" --preprocess "examples/sklearn/preprocess.py" --model-id <newly_created_model_id_here>
|
||||
```
|
||||
@@ -131,11 +135,13 @@ deployment process, as a single API automatically deploys (or removes) a model f
|
||||
- Use the RestAPI (see [details](https://clear.ml/docs/latest/docs/references/api/models#post-modelspublish_many))
|
||||
- Use Python interface:
|
||||
|
||||
```python
|
||||
from clearml import Model
|
||||
Model(model_id="unique_model_id_here").publish()
|
||||
```
|
||||
```python
|
||||
from clearml import Model
|
||||
Model(model_id="unique_model_id_here").publish()
|
||||
```
|
||||
|
||||
1. The new model is available on a new endpoint version (1), test with:
|
||||
|
||||
```bash
|
||||
curl -X POST "http://127.0.0.1:8080/serve/test_model_sklearn_auto/1" -H "accept: application/json" -H "Content-Type: application/json" -d '{"x0": 1, "x1": 2}'
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user