-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 867c418
Showing
161 changed files
with
5,042 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
## [0.6.2] - 2018-04-27 | ||
### Changed | ||
- Namespace Conda environment kernel paths to avoid collision with module | ||
environment kernels. | ||
- Only attempt to install package if it doesn't exist to speed up launch | ||
process. | ||
|
||
### Fixed | ||
- *Hopefully* fixed race condition when downloading packages. | ||
|
||
## [0.6.1] - 2018-04-26 | ||
### Changed | ||
- Added timing information in output logs and increased timeout to 10 minutes. | ||
|
||
### Fixed | ||
- Fixed issue with Conda environments not being loaded properly. | ||
|
||
## [0.6.0] - 2018-04-17 | ||
### Added | ||
- Added debug queue as an option. | ||
- Users can now specify number of cores on the node. | ||
|
||
### Changed | ||
- Changed server timeout to 120 seconds to account for running on shared node. | ||
|
||
## [0.5.0] - 2018-03-28 | ||
### Added | ||
- Added support for user-created Conda environments. | ||
|
||
### Changed | ||
- Use custom Jupyter Notebook module provided by SciApps. | ||
|
||
## [0.4.1] - 2018-03-06 | ||
### Changed | ||
- Output more debug info. | ||
|
||
## [0.4.0] - 2018-03-06 | ||
### Added | ||
- Added the various Python modules on OSC Owens as Jupyter kernels. | ||
- Added the Julia module on OSC Owens as a Jupyter kernel. | ||
|
||
### Changed | ||
- Updated date in `LICENSE.md`. | ||
- Renamed Account to Project. | ||
- Changed favicon to cogs. | ||
- Changed the way we launch Jupyter notebook by now pointing to a custom | ||
location for the Jupyter notebook installation. | ||
- Stopped using login shells to speed up process start times. | ||
|
||
## [0.3.0] - 2017-12-07 | ||
### Added | ||
- Added helpful links in the app description and node type description. | ||
[#17](https://github.com/OSC/bc_osc_jupyter/issues/17) | ||
|
||
### Changed | ||
- Updated links in `README.md` to point to correct locations. | ||
[#15](https://github.com/OSC/bc_osc_jupyter/issues/15) | ||
- Made log file more verbose. | ||
|
||
### Fixed | ||
- Fixed some text formatting issues. | ||
[#16](https://github.com/OSC/bc_osc_jupyter/issues/16) | ||
- Removed references to RStudio. | ||
[#14](https://github.com/OSC/bc_osc_jupyter/issues/14) | ||
|
||
## [0.2.1] - 2017-10-20 | ||
### Changed | ||
- Moved the account input field to the top of the form. | ||
|
||
### Fixed | ||
- Removed need for message to user about waiting for server to start. | ||
[#13](https://github.com/OSC/bc_osc_jupyter/issues/13) | ||
|
||
## [0.2.0] - 2017-10-11 | ||
### Changed | ||
- Modified app to take advantage of ERB templates in updated Dashboard. | ||
- Changed the `CHANGELOG.md` formatting. | ||
|
||
## [0.1.0] - 2017-06-14 | ||
### Changed | ||
- Refactored for the new Batch Connect app. | ||
|
||
## [0.0.5] - 2017-05-18 | ||
### Fixed | ||
- Disable XSRF protection that broke VNCSim auto-login capabilities. | ||
|
||
## [0.0.4] - 2017-05-11 | ||
### Added | ||
- Added CUDA support to Jupyter through a separate sub-app. | ||
|
||
## [0.0.3] - 2017-04-24 | ||
### Removed | ||
- Versioning the assets removed need for `bin/setup`. | ||
|
||
## [0.0.2] - 2017-04-21 | ||
### Added | ||
- Added `bin/setup` script for easier deployment. | ||
|
||
## 0.0.1 - 2017-04-04 | ||
### Added | ||
- Initial release! | ||
|
||
[Unreleased]: https://github.com/OSC/bc_osc_jupyter/compare/v0.6.2...HEAD | ||
[0.6.2]: https://github.com/OSC/bc_osc_jupyter/compare/v0.6.1...v0.6.2 | ||
[0.6.1]: https://github.com/OSC/bc_osc_jupyter/compare/v0.6.0...v0.6.1 | ||
[0.6.0]: https://github.com/OSC/bc_osc_jupyter/compare/v0.5.0...v0.6.0 | ||
[0.5.0]: https://github.com/OSC/bc_osc_jupyter/compare/v0.4.1...v0.5.0 | ||
[0.4.1]: https://github.com/OSC/bc_osc_jupyter/compare/v0.4.0...v0.4.1 | ||
[0.4.0]: https://github.com/OSC/bc_osc_jupyter/compare/v0.3.0...v0.4.0 | ||
[0.3.0]: https://github.com/OSC/bc_osc_jupyter/compare/v0.2.1...v0.3.0 | ||
[0.2.1]: https://github.com/OSC/bc_osc_jupyter/compare/v0.2.0...v0.2.1 | ||
[0.2.0]: https://github.com/OSC/bc_osc_jupyter/compare/v0.1.0...v0.2.0 | ||
[0.1.0]: https://github.com/OSC/bc_osc_jupyter/compare/v0.0.5...v0.1.0 | ||
[0.0.5]: https://github.com/OSC/bc_osc_jupyter/compare/v0.0.4...v0.0.5 | ||
[0.0.4]: https://github.com/OSC/bc_osc_jupyter/compare/v0.0.3...v0.0.4 | ||
[0.0.3]: https://github.com/OSC/bc_osc_jupyter/compare/v0.0.2...v0.0.3 | ||
[0.0.2]: https://github.com/OSC/bc_osc_jupyter/compare/v0.0.1...v0.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Copyright (c) 2016-2018 Ohio Supercomputer Center | ||
|
||
MIT License | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Batch Connect - CHPC Jupyter for ATMOS5100 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Batch Connect - CHPC Jupyter | ||
|
||
![GitHub Release](https://img.shields.io/github/release/osc/bc_osc_jupyter.svg) | ||
[![GitHub License](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT) | ||
|
||
An interactive app designed for Open OnDemand that launches a Jupyter | ||
server on a CHPC infrastructure. | ||
|
||
CHPC modifications include local cluster and Linux host adapter settings and custom Python environment entry. | ||
|
||
Most content below is from the original [OSC app](https://github.com/OSC/bc_osc_jupyter). | ||
|
||
## 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): | ||
|
||
- [Lmod] 6.0.1+ or any other `module purge` and `module load <modules>` based | ||
CLI used to load appropriate environments within the batch job before | ||
launching the Jupyter server. | ||
- [Jupyter] 4.2.3+ (earlier versions are untested but may work for | ||
you) | ||
- [OpenSSL] 1.0.1+ (used to hash the Jupyter server password) | ||
|
||
[Jupyter]: https://jupyter.org/ | ||
[OpenSSL]: https://www.openssl.org/ | ||
[Lmod]: https://www.tacc.utexas.edu/research-development/tacc-projects/lmod | ||
|
||
## Install | ||
|
||
Use Git to clone this app and checkout the desired branch/version you want to | ||
use: | ||
|
||
```sh | ||
scl enable git19 -- git clone <repo> | ||
cd <dir> | ||
scl enable git19 -- git checkout <tag/branch> | ||
``` | ||
|
||
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. | ||
|
||
To update the app you would: | ||
|
||
```sh | ||
cd <dir> | ||
scl enable git19 -- git fetch | ||
scl enable git19 -- git checkout <tag/branch> | ||
``` | ||
|
||
Again, you do not need to restart the app as it isn't a Passenger app. | ||
|
||
## CHEN3603 changes | ||
|
||
- James installed Notebook Extensions, to figure out what extension is loaded in the notebook, in the terminal, source the Anaconda environment, in file ```/home/mcuma/.jupyter/jupyter_notebook_config.py```, modify ``` c.Application.show_config = True```, run ```jupyter notebook``` to see what is the config option, e.g.: | ||
``` | ||
.nbserver_extensions = {'jupyter_nbextensions_configurator': True} | ||
``` | ||
This goes to template/before.sh as: | ||
``` | ||
c.NotebookApp.nbserver_extensions = {"jupyter_nbextensions_configurator": True} | ||
``` | ||
|
||
- then in template/script.sh, we load the environment as: | ||
``` | ||
module use /uufs/chpc.utah.edu/common/home/u0033394/MyModules | ||
module load miniconda3/CHEN3603 | ||
# to export to PDF, need xetex which is not part of the system: | ||
module load texlive/2019 | ||
``` | ||
|
||
## Contributing | ||
|
||
1. Fork it ( https://github.com/OSC/bc_osc_jupyter/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
download.file("http://home.chpc.utah.edu/~mcuma/index.html","index.html") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
'use strict' | ||
|
||
/** | ||
* Clamp between two numbers | ||
* | ||
* @param {number} min The minimum | ||
* @param {number} max The maximum | ||
* @param {number} val The value to clamp | ||
*/ | ||
function clamp(min, max, val) { | ||
return Math.min(max, Math.max(min, val)); | ||
} | ||
|
||
/** | ||
* Fix num cores, allowing blanks to remain | ||
*/ | ||
function fix_num_cores() { | ||
let node_type_input = $('#batch_connect_session_context_node_type'); | ||
let num_cores_input = $('#batch_connect_session_context_num_cores'); | ||
|
||
if(num_cores_input.val() === '') { | ||
return; | ||
} | ||
|
||
set_ppn_by_node_type(node_type_input, num_cores_input); | ||
} | ||
|
||
/** | ||
* Sets the ppn by node type. | ||
* | ||
* @param {element} node_type_input The node type input | ||
* @param {element} num_cores_input The number cores input | ||
*/ | ||
function set_ppn_by_node_type(node_type_input, num_cores_input) { | ||
let data = node_type_input.find(':selected').data(); | ||
|
||
num_cores_input.attr('max', data.maxPpn); | ||
num_cores_input.attr('min', data.minPpn); | ||
|
||
// Clamp value between min and max | ||
num_cores_input.val( | ||
clamp(data.minPpn, data.maxPpn, num_cores_input.val()) | ||
); | ||
} | ||
|
||
/** | ||
* Toggle the visibilty of a form group | ||
* | ||
* @param {string} form_id The form identifier | ||
* @param {boolean} show Whether to show or hide | ||
*/ | ||
function toggle_visibilty_of_form_group(form_id, show) { | ||
let form_element = $(form_id); | ||
let parent = form_element.parent(); | ||
|
||
if(show) { | ||
parent.show(); | ||
} else { | ||
form_element.val(''); | ||
parent.hide(); | ||
} | ||
} | ||
|
||
/** | ||
* Toggle the visibilty of the CUDA select | ||
* | ||
* Looking for the value of data-can-show-cuda | ||
*/ | ||
function toggle_cuda_version_visibility() { | ||
let node_type_input = $('#batch_connect_session_context_node_type'); | ||
|
||
// Allow for cuda_version control not existing | ||
if ( ! ($('#batch_connect_session_context_cuda_version').length > 0) ) { | ||
return; | ||
} | ||
|
||
toggle_visibilty_of_form_group( | ||
'#batch_connect_session_context_cuda_version', | ||
node_type_input.find(':selected').data('can-show-cuda') | ||
); | ||
} | ||
|
||
/** | ||
* Sets the change handler for the node_type select. | ||
*/ | ||
function set_node_type_change_handler() { | ||
let node_type_input = $('#batch_connect_session_context_node_type'); | ||
node_type_input.change(node_type_change_hander); | ||
} | ||
|
||
/** | ||
* Update UI when node_type changes | ||
*/ | ||
function node_type_change_hander() { | ||
fix_num_cores(); | ||
toggle_cuda_version_visibility(); | ||
} | ||
|
||
/** | ||
* Main | ||
*/ | ||
|
||
// Set controls to align with the values of the last session context | ||
fix_num_cores(); | ||
toggle_cuda_version_visibility(); | ||
|
||
// Install event handlers | ||
set_node_type_change_handler(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: "ATMOS5100" | ||
attributes: | ||
cluster: | ||
widget: "select" | ||
options: | ||
- "notchpeak" | ||
bc_num_hours: | ||
value: 1 | ||
min: 1 | ||
max: 8 | ||
step: 1 | ||
help: "Maximum wall time on notchpeak-shared-short is 8 hours." | ||
my_account: | ||
label: "Account" | ||
widget: "select" | ||
options: | ||
- "notchpeak-shared-short" | ||
my_queue: | ||
label: "Partition" | ||
widget: "select" | ||
options: | ||
- "notchpeak-shared-short" | ||
|
||
form: | ||
- cluster | ||
- bc_num_hours | ||
- my_account | ||
- my_queue | ||
- bc_email_on_started |
Oops, something went wrong.