Skip to content

Commit

Permalink
fix: improve parameters description (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
mosoriob authored Feb 9, 2024
1 parent 7490ddf commit b17e8b3
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 34 deletions.
22 changes: 11 additions & 11 deletions app-dev.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"id": "jupyter-lab-llama-ls6-dev",
"version": "0.0.6",
"description": "Run an interactive Jupyter Lab session on an HPC compute node to use LLama. ",
"version": "0.0.7",
"description": "Run an interactive Jupyter Lab session on an HPC compute node to use LLama. <h3> Notice for First-Time Cookbook Users </h3> <ul> <li><b> Parameters:</b></li>The update cookbook and update conda enviroment parameters are not applicable on your first run. These options are designed for enhancing subsequent uses. <li><b>Initial Setup Time:</b></li> Please be prepared for the initial run to take approximately 10 minutes. </ul>",
"owner": "${apiUserId}",
"enabled": true,
"runtime": "SINGULARITY",
"runtimeVersion": null,
"runtimeOptions": ["SINGULARITY_RUN"],
"containerImage": "docker://ghcr.io/in-for-disaster-analytics/tap_llmrepository-docker:0.0.6",
"containerImage": "docker://ghcr.io/in-for-disaster-analytics/tap_llmrepository-docker:0.0.7",
"jobType": "BATCH",
"maxJobs": -1,
"maxJobsPerUser": -1,
Expand All @@ -30,33 +30,33 @@
"parameterSet": {
"appArgs": [
{
"name": "Start a fresh installation of the cookbook",
"description": "If selected, the system will backup the existing cookbook directory and start a fresh installation using the latest version available. WARNING: The existing cookbook directory will be deleted and stored in a backup directory.",
"name": "Update cookbook",
"description": "Control whether the system will update the existing cookbook with the latest version available. This option is irrelevant if you are running the cookbook for the first time.",
"inputMode": "REQUIRED",
"arg": "false",
"notes": {
"enum_values": [
{
"true": "Yes, start a fresh installation of the cookbook"
"true": "Update to latest version"
},
{
"false": "No, keep current installation"
"false": "Keep current version"
}
]
}
},
{
"name": "Update conda environment",
"description": "If selected, the system will update the conda environment using the latest version available. WARNING: The existing conda environment will be deleted and reinstalled. ",
"description": "Control whether the system will update the existing conda environment with the latest version available. This option is irrelevant if you are running the cookbook for the first time.",
"inputMode": "REQUIRED",
"arg": "false",
"notes": {
"enum_values": [
{
"true": "Yes, update conda environment"
"true": "Update to latest version."
},
{
"false": "No, keep current conda environment"
"false": "Keep current version"
}
]
}
Expand Down Expand Up @@ -161,7 +161,7 @@
"notes": {
"label": "LLama Index Environment (LoneStar 6) Development",
"helpUrl": "https://github.com/In-For-Disaster-Analytics/sites-and-stories-nlp/tree/jupyterenv",
"helpText": "This app is a Jupyter Lab environment that allows you to use LLama to index data on the TACC Cloud Data Archive. It is a work in progress and is not yet fully functional.",
"html": "This app is a Jupyter Lab environment that allows you to use LLama to index data on the TACC Cloud Data Archive. It is a work in progress and is not yet fully functional.",
"hideNodeCountAndCoresPerNode": true,
"isInteractive": true,
"icon": "jupyter",
Expand Down
20 changes: 10 additions & 10 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"id": "jupyter-lab-llama-ls6",
"version": "0.0.6",
"description": "Run an interactive Jupyter Lab session on an HPC compute node to use LLama.",
"version": "0.0.7",
"description": "Run an interactive Jupyter Lab session on an HPC compute node to use LLama. <h3> Notice for First-Time Cookbook Users </h3> <ul> <li><b> Parameters:</b></li>The update cookbook and update conda enviroment parameters are not applicable on your first run. These options are designed for enhancing subsequent uses. <li><b>Initial Setup Time:</b></li> Please be prepared for the initial run to take approximately 10 minutes. </ul>",
"owner": "${apiUserId}",
"enabled": true,
"runtime": "SINGULARITY",
"runtimeVersion": null,
"runtimeOptions": ["SINGULARITY_RUN"],
"containerImage": "docker://ghcr.io/in-for-disaster-analytics/tap_llmrepository-docker:0.0.6",
"containerImage": "docker://ghcr.io/in-for-disaster-analytics/tap_llmrepository-docker:0.0.7",
"jobType": "BATCH",
"maxJobs": -1,
"maxJobsPerUser": -1,
Expand All @@ -30,33 +30,33 @@
"parameterSet": {
"appArgs": [
{
"name": "Start a fresh installation of the cookbook",
"description": "If selected, the system will backup the existing cookbook directory and start a fresh installation using the latest version available. WARNING: The existing cookbook directory will be deleted and stored in a backup directory.",
"name": "Update cookbook",
"description": "Control whether the system will update the existing cookbook with the latest version available. This option is irrelevant if you are running the cookbook for the first time.",
"inputMode": "REQUIRED",
"arg": "false",
"notes": {
"enum_values": [
{
"true": "Yes, start a fresh installation of the cookbook"
"true": "Update to latest version"
},
{
"false": "No, keep current installation"
"false": "Keep current version"
}
]
}
},
{
"name": "Update conda environment",
"description": "If selected, the system will update the conda environment using the latest version available. WARNING: The existing conda environment will be deleted and reinstalled. ",
"description": "Control whether the system will update the existing conda environment with the latest version available. This option is irrelevant if you are running the cookbook for the first time.",
"inputMode": "REQUIRED",
"arg": "false",
"notes": {
"enum_values": [
{
"true": "Yes, update conda environment"
"true": "Update to latest version."
},
{
"false": "No, keep current conda environment"
"false": "Keep current version"
}
]
}
Expand Down
25 changes: 12 additions & 13 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ if [ "$#" -ne 4 ]; then
exit 1
fi


function install_conda() {
echo "Checking if miniconda3 is installed..."
if [ ! -d "$WORK/miniconda3" ]; then
Expand Down Expand Up @@ -67,7 +66,7 @@ function clone_cookbook_on_workspace() {
if [ ! -d "$COOKBOOK_WORKSPACE_DIR" ]; then
git clone ${GIT_REPO_URL} --branch ${GIT_BRANCH} ${COOKBOOK_WORKSPACE_DIR}
else
if [ ${START_FRESH_INSTALLATION} = "true" ]; then
if [ ${DOWNLOAD_LATEST_VERSION} = "true" ]; then
mv ${COOKBOOK_WORKSPACE_DIR} ${COOKBOOK_WORKSPACE_DIR}-${DATE_FILE_SUFFIX}
git clone ${GIT_REPO_URL} --branch ${GIT_BRANCH} ${COOKBOOK_WORKSPACE_DIR}
fi
Expand Down Expand Up @@ -255,18 +254,18 @@ function delete_conda_environment() {
conda env remove -n ${COOKBOOK_CONDA_ENV}
}


function install_dependencies() {
### Create env
if { conda_environment_exists; } >/dev/null 2>&1; then
if [ ${START_FRESH_INSTALLATION} = "true" ]; then
function handle_installation() {
if [ ${UPDATE_CONDA_ENV} = "true" ]; then
if { conda_environment_exists; } >/dev/null 2>&1; then
delete_conda_environment
create_conda_environment
elif [ ${UPDATE_CONDA_ENV} = "true" ]; then
update_conda_enviroment
fi
else
create_conda_environment
else
if { conda_environment_exists; } >/dev/null 2>&1; then
install_base_packages
else
create_conda_environment
fi
fi
}

Expand All @@ -279,7 +278,7 @@ function get_elapsed_time() {
}

#Parameters
export START_FRESH_INSTALLATION=$1
export DOWNLOAD_LATEST_VERSION=$1
export UPDATE_CONDA_ENV=$2
export GIT_REPO_URL=$3
export GIT_BRANCH=$4
Expand All @@ -293,7 +292,7 @@ load_tap_functions
get_tap_certificate
get_tap_token
create_jupyter_configuration
install_dependencies
handle_installation
run_jupyter
port_fowarding
send_url_to_webhook
Expand Down

0 comments on commit b17e8b3

Please sign in to comment.