diff --git a/demo.ipynb b/demo.ipynb index 24f2d6d..7cdeebb 100644 --- a/demo.ipynb +++ b/demo.ipynb @@ -22,7 +22,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -42,7 +42,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -86,14 +86,14 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Document ID: ffb17cc2-4e38-4482-a96e-7ce339809cbf\n" + "Document ID: 5dfc733a-202e-47c0-8103-522adcd436d3\n" ] } ], @@ -104,65 +104,49 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2024.1-preview: Pulling from intersystems/iris-community\n", + "Digest: sha256:8d764a2b86f95180f7a34ef1f8a49e22892b0b22d48444d2c867718ef55da48c\n", + "Status: Image is up to date for containers.intersystems.com/intersystems/iris-community:2024.1-preview\n", + "containers.intersystems.com/intersystems/iris-community:2024.1-preview\n", + "\u001b[1m\n", + "What's Next?\n", + "\u001b[0m 1. Sign in to your Docker account → \u001b[36mdocker login\u001b[0m\n", + " 2. View a summary of image vulnerabilities and recommendations → \u001b[36mdocker scout quickview containers.intersystems.com/intersystems/iris-community:2024.1-preview\u001b[0m\n" + ] + } + ], "source": [ "!docker pull containers.intersystems.com/intersystems/iris-community:2024.1-preview" ] }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "Pulling image containers.intersystems.com/intersystems/iris-community:2024.1-preview\n" + "Pulling image containers.intersystems.com/intersystems/iris-community:2024.1-preview\n", + "Container started: 082db6725893\n", + "Waiting to be ready...\n", + "Waiting to be ready...\n" ] }, { - "ename": "ImageNotFound", - "evalue": "404 Client Error for http+docker://localhost/v1.44/images/containers.intersystems.com/intersystems/iris-community:2024.1-preview/json: Not Found (\"No such image: containers.intersystems.com/intersystems/iris-community:2024.1-preview\")", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mHTTPError\u001b[0m Traceback (most recent call last)", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/docker/api/client.py:265\u001b[0m, in \u001b[0;36mAPIClient._raise_for_status\u001b[0;34m(self, response)\u001b[0m\n\u001b[1;32m 264\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 265\u001b[0m \u001b[43mresponse\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mraise_for_status\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 266\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m requests\u001b[38;5;241m.\u001b[39mexceptions\u001b[38;5;241m.\u001b[39mHTTPError \u001b[38;5;28;01mas\u001b[39;00m e:\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/requests/models.py:1021\u001b[0m, in \u001b[0;36mResponse.raise_for_status\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1020\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m http_error_msg:\n\u001b[0;32m-> 1021\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m HTTPError(http_error_msg, response\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m)\n", - "\u001b[0;31mHTTPError\u001b[0m: 404 Client Error: Not Found for url: http+docker://localhost/v1.44/containers/create", - "\nThe above exception was the direct cause of the following exception:\n", - "\u001b[0;31mImageNotFound\u001b[0m Traceback (most recent call last)", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/docker/models/containers.py:873\u001b[0m, in \u001b[0;36mContainerCollection.run\u001b[0;34m(self, image, command, stdout, stderr, remove, **kwargs)\u001b[0m\n\u001b[1;32m 872\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 873\u001b[0m container \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcreate\u001b[49m\u001b[43m(\u001b[49m\u001b[43mimage\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mimage\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcommand\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcommand\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 874\u001b[0m \u001b[43m \u001b[49m\u001b[43mdetach\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdetach\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 875\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m ImageNotFound:\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/docker/models/containers.py:932\u001b[0m, in \u001b[0;36mContainerCollection.create\u001b[0;34m(self, image, command, **kwargs)\u001b[0m\n\u001b[1;32m 931\u001b[0m create_kwargs \u001b[38;5;241m=\u001b[39m _create_container_args(kwargs)\n\u001b[0;32m--> 932\u001b[0m resp \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mapi\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcreate_container\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mcreate_kwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 933\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mget(resp[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mId\u001b[39m\u001b[38;5;124m'\u001b[39m])\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/docker/api/container.py:439\u001b[0m, in \u001b[0;36mContainerApiMixin.create_container\u001b[0;34m(self, image, command, hostname, user, detach, stdin_open, tty, ports, environment, volumes, network_disabled, name, entrypoint, working_dir, domainname, host_config, mac_address, labels, stop_signal, networking_config, healthcheck, stop_timeout, runtime, use_config_proxy, platform)\u001b[0m\n\u001b[1;32m 431\u001b[0m config \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mcreate_container_config(\n\u001b[1;32m 432\u001b[0m image, command, hostname, user, detach, stdin_open, tty,\n\u001b[1;32m 433\u001b[0m ports, environment, volumes,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 437\u001b[0m stop_timeout, runtime\n\u001b[1;32m 438\u001b[0m )\n\u001b[0;32m--> 439\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcreate_container_from_config\u001b[49m\u001b[43m(\u001b[49m\u001b[43mconfig\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mname\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mplatform\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/docker/api/container.py:456\u001b[0m, in \u001b[0;36mContainerApiMixin.create_container_from_config\u001b[0;34m(self, config, name, platform)\u001b[0m\n\u001b[1;32m 455\u001b[0m res \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_post_json(u, data\u001b[38;5;241m=\u001b[39mconfig, params\u001b[38;5;241m=\u001b[39mparams)\n\u001b[0;32m--> 456\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_result\u001b[49m\u001b[43m(\u001b[49m\u001b[43mres\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/docker/api/client.py:271\u001b[0m, in \u001b[0;36mAPIClient._result\u001b[0;34m(self, response, json, binary)\u001b[0m\n\u001b[1;32m 270\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (json \u001b[38;5;129;01mand\u001b[39;00m binary)\n\u001b[0;32m--> 271\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_raise_for_status\u001b[49m\u001b[43m(\u001b[49m\u001b[43mresponse\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 273\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m json:\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/docker/api/client.py:267\u001b[0m, in \u001b[0;36mAPIClient._raise_for_status\u001b[0;34m(self, response)\u001b[0m\n\u001b[1;32m 266\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m requests\u001b[38;5;241m.\u001b[39mexceptions\u001b[38;5;241m.\u001b[39mHTTPError \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[0;32m--> 267\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[43mcreate_api_error_from_http_exception\u001b[49m\u001b[43m(\u001b[49m\u001b[43me\u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01me\u001b[39;00m\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/docker/errors.py:39\u001b[0m, in \u001b[0;36mcreate_api_error_from_http_exception\u001b[0;34m(e)\u001b[0m\n\u001b[1;32m 38\u001b[0m \u001b[38;5;28mcls\u001b[39m \u001b[38;5;241m=\u001b[39m NotFound\n\u001b[0;32m---> 39\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;28mcls\u001b[39m(e, response\u001b[38;5;241m=\u001b[39mresponse, explanation\u001b[38;5;241m=\u001b[39mexplanation) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01me\u001b[39;00m\n", - "\u001b[0;31mImageNotFound\u001b[0m: 404 Client Error for http+docker://localhost/v1.44/containers/create: Not Found (\"No such image: containers.intersystems.com/intersystems/iris-community:2024.1-preview\")", - "\nDuring handling of the above exception, another exception occurred:\n", - "\u001b[0;31mHTTPError\u001b[0m Traceback (most recent call last)", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/docker/api/client.py:265\u001b[0m, in \u001b[0;36mAPIClient._raise_for_status\u001b[0;34m(self, response)\u001b[0m\n\u001b[1;32m 264\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 265\u001b[0m \u001b[43mresponse\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mraise_for_status\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 266\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m requests\u001b[38;5;241m.\u001b[39mexceptions\u001b[38;5;241m.\u001b[39mHTTPError \u001b[38;5;28;01mas\u001b[39;00m e:\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/requests/models.py:1021\u001b[0m, in \u001b[0;36mResponse.raise_for_status\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1020\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m http_error_msg:\n\u001b[0;32m-> 1021\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m HTTPError(http_error_msg, response\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m)\n", - "\u001b[0;31mHTTPError\u001b[0m: 404 Client Error: Not Found for url: http+docker://localhost/v1.44/images/containers.intersystems.com/intersystems/iris-community:2024.1-preview/json", - "\nThe above exception was the direct cause of the following exception:\n", - "\u001b[0;31mImageNotFound\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[1], line 15\u001b[0m\n\u001b[1;32m 13\u001b[0m container \u001b[38;5;241m=\u001b[39m IRISContainer(image, username\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdemo\u001b[39m\u001b[38;5;124m\"\u001b[39m, password\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdemo\u001b[39m\u001b[38;5;124m\"\u001b[39m, namespace\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdemo\u001b[39m\u001b[38;5;124m\"\u001b[39m, license_key\u001b[38;5;241m=\u001b[39mlicense_key)\n\u001b[1;32m 14\u001b[0m container\u001b[38;5;241m.\u001b[39mwith_exposed_ports(\u001b[38;5;241m1972\u001b[39m, \u001b[38;5;241m52773\u001b[39m)\n\u001b[0;32m---> 15\u001b[0m \u001b[43mcontainer\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstart\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 16\u001b[0m CONNECTION_STRING \u001b[38;5;241m=\u001b[39m container\u001b[38;5;241m.\u001b[39mget_connection_url(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mlocalhost\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 18\u001b[0m time\u001b[38;5;241m.\u001b[39msleep(\u001b[38;5;241m1\u001b[39m)\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/testcontainers/core/generic.py:54\u001b[0m, in \u001b[0;36mDbContainer.start\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 52\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mstart\u001b[39m(\u001b[38;5;28mself\u001b[39m):\n\u001b[1;32m 53\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_configure()\n\u001b[0;32m---> 54\u001b[0m \u001b[38;5;28;43msuper\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstart\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 55\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_connect()\n\u001b[1;32m 56\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/testcontainers/core/container.py:55\u001b[0m, in \u001b[0;36mDockerContainer.start\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 53\u001b[0m logger\u001b[38;5;241m.\u001b[39minfo(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mPulling image \u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mimage)\n\u001b[1;32m 54\u001b[0m docker_client \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mget_docker_client()\n\u001b[0;32m---> 55\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_container \u001b[38;5;241m=\u001b[39m \u001b[43mdocker_client\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrun\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mimage\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 56\u001b[0m \u001b[43m \u001b[49m\u001b[43mcommand\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_command\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 57\u001b[0m \u001b[43m \u001b[49m\u001b[43mdetach\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m,\u001b[49m\n\u001b[1;32m 58\u001b[0m \u001b[43m \u001b[49m\u001b[43menvironment\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43menv\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 59\u001b[0m \u001b[43m \u001b[49m\u001b[43mports\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mports\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 60\u001b[0m \u001b[43m \u001b[49m\u001b[43mname\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_name\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 61\u001b[0m \u001b[43m \u001b[49m\u001b[43mvolumes\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvolumes\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 62\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_kwargs\u001b[49m\n\u001b[1;32m 63\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 64\u001b[0m logger\u001b[38;5;241m.\u001b[39minfo(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mContainer started: \u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_container\u001b[38;5;241m.\u001b[39mshort_id)\n\u001b[1;32m 65\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/testcontainers/core/docker_client.py:33\u001b[0m, in \u001b[0;36mDockerClient.run\u001b[0;34m(self, image, command, environment, ports, detach, stdout, stderr, remove, **kwargs)\u001b[0m\n\u001b[1;32m 25\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mrun\u001b[39m(\u001b[38;5;28mself\u001b[39m, image: \u001b[38;5;28mstr\u001b[39m,\n\u001b[1;32m 26\u001b[0m command: \u001b[38;5;28mstr\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m,\n\u001b[1;32m 27\u001b[0m environment: \u001b[38;5;28mdict\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 31\u001b[0m stderr: \u001b[38;5;28mbool\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mFalse\u001b[39;00m,\n\u001b[1;32m 32\u001b[0m remove: \u001b[38;5;28mbool\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mFalse\u001b[39;00m, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Container:\n\u001b[0;32m---> 33\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcontainers\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrun\u001b[49m\u001b[43m(\u001b[49m\u001b[43mimage\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 34\u001b[0m \u001b[43m \u001b[49m\u001b[43mcommand\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcommand\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 35\u001b[0m \u001b[43m \u001b[49m\u001b[43mstdout\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstdout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 36\u001b[0m \u001b[43m \u001b[49m\u001b[43mstderr\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstderr\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 37\u001b[0m \u001b[43m \u001b[49m\u001b[43mremove\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mremove\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 38\u001b[0m \u001b[43m \u001b[49m\u001b[43mdetach\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdetach\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 39\u001b[0m \u001b[43m \u001b[49m\u001b[43menvironment\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43menvironment\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 40\u001b[0m \u001b[43m \u001b[49m\u001b[43mports\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mports\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 41\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/docker/models/containers.py:876\u001b[0m, in \u001b[0;36mContainerCollection.run\u001b[0;34m(self, image, command, stdout, stderr, remove, **kwargs)\u001b[0m\n\u001b[1;32m 873\u001b[0m container \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mcreate(image\u001b[38;5;241m=\u001b[39mimage, command\u001b[38;5;241m=\u001b[39mcommand,\n\u001b[1;32m 874\u001b[0m detach\u001b[38;5;241m=\u001b[39mdetach, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n\u001b[1;32m 875\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m ImageNotFound:\n\u001b[0;32m--> 876\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mimages\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mpull\u001b[49m\u001b[43m(\u001b[49m\u001b[43mimage\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mplatform\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mplatform\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 877\u001b[0m container \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mcreate(image\u001b[38;5;241m=\u001b[39mimage, command\u001b[38;5;241m=\u001b[39mcommand,\n\u001b[1;32m 878\u001b[0m detach\u001b[38;5;241m=\u001b[39mdetach, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n\u001b[1;32m 880\u001b[0m container\u001b[38;5;241m.\u001b[39mstart()\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/docker/models/images.py:474\u001b[0m, in \u001b[0;36mImageCollection.pull\u001b[0;34m(self, repository, tag, all_tags, **kwargs)\u001b[0m\n\u001b[1;32m 472\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m all_tags:\n\u001b[1;32m 473\u001b[0m sep \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124m@\u001b[39m\u001b[38;5;124m'\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m tag\u001b[38;5;241m.\u001b[39mstartswith(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124msha256:\u001b[39m\u001b[38;5;124m'\u001b[39m) \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124m:\u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[0;32m--> 474\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43mf\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;132;43;01m{\u001b[39;49;00m\u001b[43mrepository\u001b[49m\u001b[38;5;132;43;01m}\u001b[39;49;00m\u001b[38;5;132;43;01m{\u001b[39;49;00m\u001b[43msep\u001b[49m\u001b[38;5;132;43;01m}\u001b[39;49;00m\u001b[38;5;132;43;01m{\u001b[39;49;00m\u001b[43mtag\u001b[49m\u001b[38;5;132;43;01m}\u001b[39;49;00m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 475\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mlist(repository)\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/docker/models/images.py:333\u001b[0m, in \u001b[0;36mImageCollection.get\u001b[0;34m(self, name)\u001b[0m\n\u001b[1;32m 317\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mget\u001b[39m(\u001b[38;5;28mself\u001b[39m, name):\n\u001b[1;32m 318\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 319\u001b[0m \u001b[38;5;124;03m Gets an image.\u001b[39;00m\n\u001b[1;32m 320\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 331\u001b[0m \u001b[38;5;124;03m If the server returns an error.\u001b[39;00m\n\u001b[1;32m 332\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m--> 333\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mprepare_model(\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mapi\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43minspect_image\u001b[49m\u001b[43m(\u001b[49m\u001b[43mname\u001b[49m\u001b[43m)\u001b[49m)\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/docker/utils/decorators.py:19\u001b[0m, in \u001b[0;36mcheck_resource..decorator..wrapped\u001b[0;34m(self, resource_id, *args, **kwargs)\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m resource_id:\n\u001b[1;32m 16\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m errors\u001b[38;5;241m.\u001b[39mNullResource(\n\u001b[1;32m 17\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mResource ID was not provided\u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[1;32m 18\u001b[0m )\n\u001b[0;32m---> 19\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mf\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mresource_id\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/docker/api/image.py:251\u001b[0m, in \u001b[0;36mImageApiMixin.inspect_image\u001b[0;34m(self, image)\u001b[0m\n\u001b[1;32m 234\u001b[0m \u001b[38;5;129m@utils\u001b[39m\u001b[38;5;241m.\u001b[39mcheck_resource(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mimage\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m 235\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21minspect_image\u001b[39m(\u001b[38;5;28mself\u001b[39m, image):\n\u001b[1;32m 236\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 237\u001b[0m \u001b[38;5;124;03m Get detailed information about an image. Similar to the ``docker\u001b[39;00m\n\u001b[1;32m 238\u001b[0m \u001b[38;5;124;03m inspect`` command, but only for images.\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 249\u001b[0m \u001b[38;5;124;03m If the server returns an error.\u001b[39;00m\n\u001b[1;32m 250\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m--> 251\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_result\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 252\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_get\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_url\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43m/images/\u001b[39;49m\u001b[38;5;132;43;01m{0}\u001b[39;49;00m\u001b[38;5;124;43m/json\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mimage\u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\n\u001b[1;32m 253\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/docker/api/client.py:271\u001b[0m, in \u001b[0;36mAPIClient._result\u001b[0;34m(self, response, json, binary)\u001b[0m\n\u001b[1;32m 269\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m_result\u001b[39m(\u001b[38;5;28mself\u001b[39m, response, json\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m, binary\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m):\n\u001b[1;32m 270\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (json \u001b[38;5;129;01mand\u001b[39;00m binary)\n\u001b[0;32m--> 271\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_raise_for_status\u001b[49m\u001b[43m(\u001b[49m\u001b[43mresponse\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 273\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m json:\n\u001b[1;32m 274\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m response\u001b[38;5;241m.\u001b[39mjson()\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/docker/api/client.py:267\u001b[0m, in \u001b[0;36mAPIClient._raise_for_status\u001b[0;34m(self, response)\u001b[0m\n\u001b[1;32m 265\u001b[0m response\u001b[38;5;241m.\u001b[39mraise_for_status()\n\u001b[1;32m 266\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m requests\u001b[38;5;241m.\u001b[39mexceptions\u001b[38;5;241m.\u001b[39mHTTPError \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[0;32m--> 267\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[43mcreate_api_error_from_http_exception\u001b[49m\u001b[43m(\u001b[49m\u001b[43me\u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01me\u001b[39;00m\n", - "File \u001b[0;32m~/Projects/llama-iris/.venv/lib/python3.11/site-packages/docker/errors.py:39\u001b[0m, in \u001b[0;36mcreate_api_error_from_http_exception\u001b[0;34m(e)\u001b[0m\n\u001b[1;32m 37\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 38\u001b[0m \u001b[38;5;28mcls\u001b[39m \u001b[38;5;241m=\u001b[39m NotFound\n\u001b[0;32m---> 39\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;28mcls\u001b[39m(e, response\u001b[38;5;241m=\u001b[39mresponse, explanation\u001b[38;5;241m=\u001b[39mexplanation) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01me\u001b[39;00m\n", - "\u001b[0;31mImageNotFound\u001b[0m: 404 Client Error for http+docker://localhost/v1.44/images/containers.intersystems.com/intersystems/iris-community:2024.1-preview/json: Not Found (\"No such image: containers.intersystems.com/intersystems/iris-community:2024.1-preview\")" + "name": "stdout", + "output_type": "stream", + "text": [ + "Started iris://demo:demo@localhost:51024/demo\n", + "Portal: http://localhost:51023/csp/sys/UtilHome.csp\n" ] } ], @@ -191,16 +175,36 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 9, "metadata": {}, "outputs": [ { - "name": "stderr", - "output_type": "stream", - "text": [ - "Parsing nodes: 100%|██████████| 1/1 [00:00<00:00, 13.18it/s]\n", - "Generating embeddings: 100%|██████████| 22/22 [00:01<00:00, 15.59it/s]\n" - ] + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "d21253f0bd684cbd9441bb5502c22cbb", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Parsing nodes: 0%| | 0/1 [00:00