diff --git a/form.yml b/form.yml index 9b291af..3d2cffa 100644 --- a/form.yml +++ b/form.yml @@ -1,18 +1,17 @@ --- cluster: - "cardinal" - - "ascend" form: - - auto_modules_matlab + - auto_modules_ollama - auto_accounts - bc_num_hours - num_cores - node_type - bc_email_on_started attributes: - auto_modules_matlab: + auto_modules_ollama: default: false - label: "MATLAB version" + label: "Ollama version" num_cores: widget: "number_field" label: "Number of cores" diff --git a/manifest.yml b/manifest.yml index 3a51f8a..39cfd0d 100644 --- a/manifest.yml +++ b/manifest.yml @@ -1,10 +1,10 @@ --- -name: MATLAB +name: Ollama category: Interactive Apps subcategory: Servers role: batch_connect description: | - This app will launch the [MATLAB] desktop in a web browser on the [Cardinal cluster]. + This app will launch the [Ollama] desktop in a web browser on the [Cardinal cluster]. - [MATLAB]: https://www.mathworks.com/products/matlab.html + [Ollama]: https://ollama.com/ [Cardinal cluster]: https://www.osc.edu/resources/technical_support/supercomputers/cardinal diff --git a/submit.yml.erb b/submit.yml.erb index 29e1296..7280734 100644 --- a/submit.yml.erb +++ b/submit.yml.erb @@ -1,8 +1,4 @@ <%- - - err_msg = "You are not a member of the matlab group. Please email oschelp@osc.edu to request access to MATLAB." - raise(StandardError, err_msg) unless CurrentUser.group_names.include?('matlab') - ppn = num_cores.blank? ? 96 : num_cores.to_i case node_type diff --git a/template/before.sh.erb b/template/before.sh.erb index b7f54bf..0594468 100755 --- a/template/before.sh.erb +++ b/template/before.sh.erb @@ -2,9 +2,5 @@ [[ $(type -t module) == "function" ]] && export -f module -port=$(find_port ${host}) - -export MWI_AUTH_TOKEN=$(create_passwd 32) -password=$MWI_AUTH_TOKEN -export MWI_BASE_URL="/node/$host/$port/" -export MWI_APP_PORT=$port \ No newline at end of file +port_ollama=$(find_port ${host}) +port=$(find_port ${host}) \ No newline at end of file diff --git a/template/script.sh.erb b/template/script.sh.erb index ae3e27c..97c0e3f 100755 --- a/template/script.sh.erb +++ b/template/script.sh.erb @@ -3,10 +3,13 @@ module purge module restore -module load <%= context.auto_modules_matlab %> -module load project/ondemand -module load app_matlab_proxy/0.23.1 +module load <%= context.auto_modules_ollama %> +export OLLAMA_PORT=$port_ollama +export OPEN_WEBUI_PORT=$port + +source ollama_start_helper cd $HOME -matlab-proxy-app \ No newline at end of file +mkdir -p $OPEN_WEBUI_DATA_DIR +apptainer exec --env "WEBUI_AUTH=False,ENABLE_PERSISTENT_CONFIG=False,OLLAMA_BASE_URL=http://0.0.0.0:$OLLAMA_PORT,PORT=$OPEN_WEBUI_PORT" --fakeroot --writable-tmpfs --bind $OPEN_WEBUI_DATA_DIR:/app/backend/data $OPEN_WEBUI_IMG bash /app/backend/start.sh diff --git a/view.html.erb b/view.html.erb index a0b5f9d..94072fa 100644 --- a/view.html.erb +++ b/view.html.erb @@ -1,7 +1,6 @@ -