Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dummy #294

Closed
wants to merge 2 commits into from
Closed

Dummy #294

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,298 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "70724412-6577-4e69-86a1-b0d94e32eb96",
"metadata": {},
"source": [
"# Configure Flavor path\n",
"\n",
"Here we will give the user the option between:\n",
" - the Exasol <a href=\"https://github.com/exasol/script-languages-release\" target=\"_blank\" rel=\"noopener\">Script-Languages-Release</a> Github repository which provides the Script-Languages-Container flavor used to build the builtin container of the Exasol DB or to build customized container\n",
" - to use a custom flavor path\n",
"\n",
"## Prerequisites\n",
"\n",
"Prior to using this notebook the following steps need to be completed:\n",
"1. [Configure the AI-Lab](../main_config.ipynb).\n",
"\n",
"## Setup\n",
"\n",
"### Open Secure Configuration Storage\n"
]
},
{
"cell_type": "code",
"execution_count": 87,
"id": "e70ad0a9-7042-4fe8-814b-5c586b9bee6d",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e6b503a366de4fbfaa27133cd764cf89",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "350dc0e4b76d4f83ba1c31818b4e4688",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Box(children=(Box(children=(Label(value='Configuration Store', layout=Layout(border_bottom='solid 1px', border…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%run ../utils/access_store_ui.ipynb\n",
"display(get_access_store_ui('../'))"
]
},
{
"cell_type": "markdown",
"id": "9f02bc2f-411f-4479-b2e2-1afef96e4bd8",
"metadata": {},
"source": [
"# Load UI functions\n",
"Let's import some other UI functions that may be used in this notebook."
]
},
{
"cell_type": "code",
"execution_count": 242,
"id": "224345da-f14e-4a45-bf8a-07e3ba0870dc",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "34d26190895748799ba240ff5496ae6c",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%run ./utils/slc_ui.ipynb"
]
},
{
"cell_type": "markdown",
"id": "178b59e9-8f46-43b1-b4f8-9cd6d6bf5076",
"metadata": {},
"source": [
"# Configure the Flavor path\n",
"### Choose the flavor source"
]
},
{
"cell_type": "code",
"execution_count": 243,
"id": "0f8caa77-35a0-403d-af96-e5f8056ba489",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "13649f5f9c334d1499382b6df9af8cbb",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Box(children=(Box(children=(Label(value='Flavor choice', layout=Layout(border_bottom='solid 1px', border_left=…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"display(get_slc_source_selection_ui(ai_lab_config))"
]
},
{
"cell_type": "markdown",
"id": "fc0fe1a5-8861-4f18-8bcf-92600f86f33f",
"metadata": {},
"source": [
"### Use existing script-languages-repository\n",
"If the user has chosen to use an existing script-languages-repository path we simply let him choose the path."
]
},
{
"cell_type": "code",
"execution_count": 244,
"id": "56e16540-5f4b-4d5c-8c83-d34c1217eb00",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "dc590fa666f64d24bb267f1d77592468",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Box(children=(Box(children=(Label(value='Existing script-languages directory', layout=Layout(border_bottom='so…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"display(get_existing_slc_ui(ai_lab_config))"
]
},
{
"cell_type": "markdown",
"id": "1db0f115-9382-4e53-be08-53586b831d0b",
"metadata": {},
"source": [
"### Clone the Script-Languages-Release repository\n",
"If the user wants to use the Exasol script-languages-repository we need first to choose the root path where the repository should be stored."
]
},
{
"cell_type": "code",
"execution_count": 245,
"id": "7d84889f-7c3a-4f69-9bf1-c193481867af",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"None"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"display(get_slc_target_dir_ui(ai_lab_config))"
]
},
{
"cell_type": "markdown",
"id": "a02ee33f-1958-4f9c-a796-01c6bc2a8787",
"metadata": {},
"source": [
"#### Now we can clone the repository"
]
},
{
"cell_type": "code",
"execution_count": 246,
"id": "31132726-9827-4c9b-8fb8-0884d2f36e67",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Ready\n"
]
}
],
"source": [
"from pathlib import Path\n",
"if use_slc_repo(ai_lab_config):\n",
" from git import Repo\n",
" \n",
" slc_dir = Path(ai_lab_config.get(\"Script-Languages-Release-Dir\"))\n",
" if not slc_dir.is_dir():\n",
" print (f\"Cloning into {slc_dir}...\")\n",
" repo = Repo.clone_from(\"https://github.com/exasol/script-languages-release\", slc_dir)\n",
" print (\"Fetching submodules...\")\n",
" repo.submodule_update(recursive=True)\n",
" else:\n",
" print(f\"Directory '{slc_dir}' already exists. Skipping cloning....\")\n",
"print(\"Ready\")"
]
},
{
"cell_type": "markdown",
"id": "53997bff-b4be-406f-b54f-ae9f39939ede",
"metadata": {},
"source": [
"#### Now we can select the flavor."
]
},
{
"cell_type": "code",
"execution_count": 247,
"id": "bb6b26b9-cb24-4b66-85c9-e15a0c92ff2c",
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "a151ede22ef447c1988bb2d92f7fea09",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Box(children=(Box(children=(Label(value='Flavor choice', layout=Layout(border_bottom='solid 1px', border_left=…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"display(get_flavor_selection_ui(ai_lab_config))"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4d38d5d4-91c7-4916-9431-83a5a8e3e5c5",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading
Loading