Skip to content

Commit 565c0c8

Browse files
committed
Add more explanation to the grpc demo
1 parent 52b4de3 commit 565c0c8

1 file changed

Lines changed: 40 additions & 1 deletion

File tree

docs/notebooks/grpc4bmi_demo.ipynb

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
"To run this notebook you need to have grpc4bmi installed in your python environment."
1414
]
1515
},
16+
{
17+
"cell_type": "markdown",
18+
"metadata": {},
19+
"source": [
20+
"Note that your directory setup (`work_dir` and `input_dir`) may differ from this example, depending on where the config file, input directory and output directory are located."
21+
]
22+
},
1623
{
1724
"cell_type": "code",
1825
"execution_count": 1,
@@ -59,7 +66,7 @@
5966
"cell_type": "markdown",
6067
"metadata": {},
6168
"source": [
62-
"Initialization works like normal. Note that you do not want to have the `DockerImage` or `ExeFilePath` entries in your configuration file (!):"
69+
"Initialization works like normal. *But note that you **do not** want to have the* `DockerImage` *or* `ExeFilePath` *entries in your configuration file*"
6370
]
6471
},
6572
{
@@ -117,6 +124,38 @@
117124
"model.get_value(\"respiration\", dest=np.zeros(1))"
118125
]
119126
},
127+
{
128+
"cell_type": "markdown",
129+
"metadata": {},
130+
"source": [
131+
"When finishing up, you can finalize the model, which will make the process inside the container exit cleanly:"
132+
]
133+
},
134+
{
135+
"cell_type": "code",
136+
"execution_count": 6,
137+
"metadata": {},
138+
"outputs": [],
139+
"source": [
140+
"model.finalize()"
141+
]
142+
},
143+
{
144+
"cell_type": "markdown",
145+
"metadata": {},
146+
"source": [
147+
"To kill the docker container and remove the logs, you (explicitly) delete the object:"
148+
]
149+
},
150+
{
151+
"cell_type": "code",
152+
"execution_count": 8,
153+
"metadata": {},
154+
"outputs": [],
155+
"source": [
156+
"del model"
157+
]
158+
},
120159
{
121160
"cell_type": "code",
122161
"execution_count": null,

0 commit comments

Comments
 (0)