From ac981b49fd6af812940b59879582952ff3ee0b0f Mon Sep 17 00:00:00 2001 From: Soufiane Jounaid Date: Wed, 1 May 2024 12:38:46 -0400 Subject: [PATCH] Added destroy container cell --- SSH_on_chiedge_tutorial.ipynb | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/SSH_on_chiedge_tutorial.ipynb b/SSH_on_chiedge_tutorial.ipynb index b0db1f3..77329d3 100644 --- a/SSH_on_chiedge_tutorial.ipynb +++ b/SSH_on_chiedge_tutorial.ipynb @@ -130,7 +130,7 @@ "\n", "try:\n", " my_container = container.create_container(\n", - " container_name, \n", + " container_name,\n", " image=\"ghcr.io/chameleoncloud/edge_ssh_image:latest\",\n", " workdir=\"/home\",\n", " exposed_ports=[22],\n", @@ -248,6 +248,26 @@ "\n", "print(\"use the following command to ssh into the container: ssh root@\" + ip_address)" ] + }, + { + "cell_type": "markdown", + "id": "8289f941", + "metadata": {}, + "source": [ + "## Destroying the container\n", + "\n", + "Destroying the container after use is good practice to keep your device running smoothly, use when needed." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a3d3c0ba", + "metadata": {}, + "outputs": [], + "source": [ + "chi.container.destroy_container(my_container.uuid)" + ] } ], "metadata": {