Skip to content
Snippets Groups Projects
Commit a0cdc1f6 authored by Fortune Iriaye's avatar Fortune Iriaye
Browse files

Merge branch 'update-readme' into 'master'

Update Readme

See merge request firiaye/bc-uab-fsl!2
parents 6521d82c 81e12669
No related branches found
No related tags found
1 merge request!2Update Readme
# Batch Connect - OSC MATLAB
# FSL Sandbox App on Cheaha Open OnDemand
![GitHub Release](https://img.shields.io/github/release/osc/bc_osc_matlab.svg)
[![GitHub License](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)
A Batch Connect app designed for OSC OnDemand that launches MATLAB within an
Owens batch job.
This readme provides a guide for setting up FSL as a stand-alone Sandbox app, that you can use on a HPC Desktop Job.
## Prerequisites
This Batch Connect app requires the following software be installed on the
**compute nodes** that the batch job is intended to run on (**NOT** the
OnDemand node):
Sandbox must be set up for your account on Cheaha, you can do this by following the guide we have in our documentations page for Cheaha on setting up [Sandbox Apps](https://docs.rc.uab.edu). Setting up Sandbox for your Cheaha account is a one-time step.
### Steps to Setup FSL
These steps show you how to setup the FSL (FMRIB Software Library) Sandbox App on Cheaha.
1. Under the "Develop" tab , click on "My SandBox Apps (Development)"
![Develop button options on Cheaha](images/cheaha_develop_sandbox.png)
1. Clicking the "New App" button should direct you to a new page giving you an option to Clone an Existing App.
![New App button to Clone an Existing App](images/sandbox_new_app.png)
<!-- markdownlint-disable MD046 -->
!!! note
You can ignore the message "No SSH key was found. You will need to generate a locally installed SSH key to clone the git repo using SSH" since you can clone the repo using https. The warning would apply if you would like to clone the repo using SSH's authentication.
<!-- markdownlint-enable MD046 -->
1. Now import the already existing git repo for an app by clicking on the "Clone Existing App". A form (shown below) requiring your input will display. For the FSL App we will use a template we already created (you can use this template to prepare your app as well).
![Form for new Sandbox App](images/sandbox_new_app_form.png)
We will add the following values in the form:
- **Directory Name:** FSL
- **Git Remote:** `https://gitlab.rc.uab.edu/rc/bc_uab_igv.git`
After completing the above steps, then click "**Submit**"
1. When this is done successfully, you should see the below screen also showing your new FSL Sandbox App.
![New Sandbox App](images/new_fsl_sandbox_app.png)
<!-- markdownlint-disable MD046 -->
!!! note
You can also check the option "Create a new Git Project from this?", about creating a new git repo, if you want to use it to maintain your own instance of the app. In this tutorial, we will not be selecting this option.
<!-- markdownlint-enable MD046 -->
1. Click on "Files" to take a look at the app files (local git repo working directory) you just cloned. We will modify some of the files here, because its contents are not relevant to FSL.
![File list for Sandbox App](images/file_sandbox_app.png)
1. We first modify "manifest.yml" file (highlight the file, and click on edit) to change metadata for the sandbox app.
Change the variables appropriately. In this case we will change the following:
![Metadata contained in manifest.yml file](images/manifest_yml_sandbox.png)
1. Next, select "form.yml.erb" and click on "Edit" . Replace the content of this file with the .yml file below.
``` yaml
<%-
partitions = OodAppkit.clusters[:SLURM_CLUSTER].custom_config[:partitions]
-%>
---
cluster: "SLURM_CLUSTER"
attributes:
bc_num_hours:
value: 1
bc_num_slots:
widget: "number_field"
label: Number of CPU
value: 1
min: 1
max: 24
step: 1
- [MATLAB] R2016b+
- [Xfce Desktop] 4+
bc_num_mems:
widget: "number_field"
label: Memory per CPU (GB)
value: 4
min: 1
max: 128
step: 1
For VNC server support:
bc_num_gpus:
widget: "number_field"
label: Number of GPUs
value: 1
min: 0
max: 4
step: 1
- [TurboVNC] 2.1+
- [websockify] 0.8.0+
bc_partition:
widget: select
label: Partition
options:
<%- partitions.each do |p| -%>
- [ "<%= p %>", "<%= p %>" ]
<%- end -%>
For hardware rendering support:
version:
widget: select
label: "FSL version"
help: "This defines the version of FSL you want to load."
options:
- [ "6.0.3", "FSL/6.0.3" ]
- [X server]
- [VirtualGL] 2.3+
form:
- version
- bc_num_hours
- bc_partition
- bc_num_gpus
- bc_num_slots
- bc_num_mems
- bc_email_on_started
**Optional** software:
```
- [Lmod] 6.0.1+ or any other `module purge` and `module load <modules>` based
CLI used to load appropriate environments within the batch job
Here we are specifying what the form for the app is going to look like, and changing relevant parameters for Cheaha.
[MATLAB]: https://www.mathworks.com/
[Xfce Desktop]: https://xfce.org/
[TurboVNC]: http://www.turbovnc.org/
[websockify]: https://github.com/novnc/websockify
[X server]: https://www.x.org/
[VirtualGL]: http://www.virtualgl.org/
[Lmod]: https://www.tacc.utexas.edu/research-development/tacc-projects/lmod
1. Next, we edit the "script.sh.erb" file. This file can also be found in the "template" folder. Edit this file by adding the lines below to the end of the file. This is the actual job script that will be submitted to the cluster, just like you would submit a job with "sbatch" from the command line.
## Install
``` YAML
module load FSL/6.0.3
source /share/apps/rc/software/FSL/6.0.3/fsl/etc/fslconf/fsl.sh
fsl
```
Use git to clone this app and checkout the desired branch/version you want to
use:
Save the file, and close the tab. This script runs the app executable after loading the appropriate module, based on the version you choose in the form.
```sh
scl enable git19 -- git clone <repo>
cd <dir>
scl enable git19 -- git checkout <tag/branch>
```
![Content of script.sh.erb](images/sandbox_scriptShErb.png)
You will not need to do anything beyond this as all necessary assets are
installed. You will also not need to restart this app as it isn't a Passenger
app.
### Launching your OOD Sandbox App
To update the app you would:
Click on Launch FSL, and submit the job with desired parameters. You should have your first dev app (FSL) running.
```sh
cd <dir>
scl enable git19 -- git fetch
scl enable git19 -- git checkout <tag/branch>
```
![Interactive App Screen](images/sandbox_launchFSL.png)
Again, you do not need to restart the app as it isn't a Passenger app.
### More info
## Contributing
[Contact us](../index.md#how-to-contact-us) if you run into any issues, or to discuss any new app.
1. Fork it ( https://github.com/OSC/bc_osc_matlab/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
images/cheaha_develop_button.png

169 KiB

images/cheaha_develop_sandbox.png

162 KiB

images/cheaha_help_button.png

152 KiB

images/cheaha_sandbox_shell_button.png

64 KiB

images/file_sandbox_app.png

121 KiB

images/manifest_yml_sandbox.png

50.2 KiB

images/new_fsl_sandbox_app.png

74.8 KiB

images/sandbox_formYmlErb.png

284 KiB

images/sandbox_launchFSL.png

335 KiB

images/sandbox_new_app.png

58.3 KiB

images/sandbox_new_app_form.png

77.4 KiB

images/sandbox_scriptShErb.png

246 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment