generated from recursionpharma/bc_jupyter
-
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
joshuaguy22
committed
Sep 15, 2023
1 parent
b504ca9
commit fa4efe2
Showing
19 changed files
with
977 additions
and
273 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,46 @@ | ||
# 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.7.0] - 2023-03-24 | ||
|
||
### Added | ||
- [32](https://github.com/OSC/bc_osc_codeserver/pull/32) Codeserver 4.8 support | ||
|
||
### Removed | ||
- - [32](https://github.com/OSC/bc_osc_codeserver/pull/32) Codeserver 3.4 selection | ||
|
||
## [0.4.0] - 2021-08-16 | ||
|
||
### Added | ||
|
||
- [20](https://github.com/OSC/bc_osc_codeserver/pull/20) add better support around | ||
cpp extension, initializing a db on a local file system. | ||
|
||
### Changed | ||
|
||
- [19](https://github.com/OSC/bc_osc_codeserver/pull/19) changed the shebang of the | ||
main script to `bash -l` so that modules and extra PATH settings get loaded from | ||
a user's ~/.bashrc file. | ||
|
||
## [0.3.0] - 2021-08-16 | ||
|
||
- entry missing! | ||
|
||
## [0.2.0] - 2021-08-16 | ||
|
||
- entry missing! | ||
|
||
## 0.1.0 - 2020-10-07 | ||
### Added | ||
- Initial release of OSC Code Server. | ||
|
||
[Unreleased]: https://github.com/OSC/bc_osc_codeserver/compare/v0.7.0...HEAD | ||
[0.7.0]: https://github.com/OSC/bc_osc_codeserver/compare/v0.6.0...v0.7.0 | ||
[0.4.0]: https://github.com/OSC/bc_osc_codeserver/compare/v0.3.0...v0.4.0 | ||
[0.3.0]: https://github.com/OSC/bc_osc_codeserver/compare/v0.2.0...v0.3.0 | ||
[0.2.0]: https://github.com/OSC/bc_osc_codeserver/compare/v0.1.0...v0.2.0 |
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 |
---|---|---|
@@ -1,8 +1,86 @@ | ||
# Batch Connect - Jupyter | ||
# Batch Connect - OSC Code Server | ||
|
||
 | ||
 | ||
[](https://opensource.org/licenses/MIT) | ||
|
||
An interactive app template designed for the BioHive Portal that launches a Jupyter | ||
server. | ||
An improved file viewer / editor for OSC OnDemand that launches a | ||
Code Server within an Owens batch job. Code Server leverages VSCode as its | ||
editor. | ||
|
||
## 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 Code server. | ||
- [Code Server] 2.x+ available from Github: https://github.com/cdr/code-server/releases | ||
|
||
[Code Server]: https://coder.com/ | ||
[Lmod]: https://www.tacc.utexas.edu/research-development/tacc-projects/lmod | ||
[VS Code]: https://code.visualstudio.com/ | ||
|
||
## Install | ||
|
||
1. Use Git to clone this app and checkout the desired branch/version you want to | ||
use and place this wherever you store batch connect apps (`/var/www/ood/apps/sys` or `~/ondemand/dev`): | ||
|
||
```sh | ||
scl enable git29 -- git clone <repo> | ||
cd <dir> | ||
scl enable git29 -- git checkout <tag/branch> | ||
``` | ||
|
||
2. Deploy code-server on your systems. | ||
|
||
```sh | ||
# replace URL with latest release from code-server | ||
wget https://github.com/cdr/code-server/releases/download/3.2.0/code-server-3.2.0-linux-x86_64.tar.gz | ||
tar -xzf code-server-3.2.0-linux-x86_64.tar.gz | ||
``` | ||
|
||
3. You will notice code-server is an executable inside that directory and can get the full path: | ||
|
||
```sh | ||
$ readlink -f code-server-3.2.0-linux-x86_64.tar.gz | ||
/users/PZS0562/efranz/code-server-3.2.0-linux-x86_64.tar.gz | ||
``` | ||
|
||
4. Update the path to the code-server binary in the script https://github.com/OSC/bc_osc_codeserver/blob/3082790ee69c82fe6fe757074da7d8d18c7d7e3d/template/script.sh.erb#L27: | ||
|
||
```diff | ||
# An arbitrary path... | ||
- /fs/project/PZS0714/mrodgers/bin/code-server-2.1523-vsc1.38.1 \ | ||
+ /users/PZS0562/efranz/code-server-3.2.0-linux-x86_64/code-server \ | ||
--auth=password \ | ||
--port="$port" \ | ||
``` | ||
|
||
5. Update form.yml to use the correct cluster, and any other changes as necessary to form.yml or submit.yml that is appropriate for your cluster. | ||
|
||
## Update | ||
|
||
To update the app you would: | ||
|
||
```sh | ||
cd <dir> | ||
scl enable git29 -- git fetch | ||
scl enable git29 -- git checkout <tag/branch> | ||
``` | ||
|
||
Again, you do not need to restart the app as it isn't a Passenger app. | ||
## Known Issues | ||
- In-app installation of extensions does not work | ||
- The authentication provided by code-server is unencrypted | ||
## Contributing | ||
1. Fork it ( https://github.com/OSC/bc_osc_codeserver/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
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 |
---|---|---|
@@ -1,9 +1,7 @@ | ||
--- | ||
name: Jupyter Sandbox | ||
name: Code Server | ||
category: Interactive Apps | ||
subcategory: Servers | ||
subcategory: BioHive Applications | ||
role: batch_connect | ||
description: | | ||
This app will launch a [Jupyter] server on the BioHive cluster. | ||
[Jupyter]: https://jupyter.org/ | ||
This app will launch a VS Code server using Code Server on the BioHive cluster. |
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,49 @@ | ||
# Disable debuginfo as it causes issues with bundled gems that build libraries | ||
%global debug_package %{nil} | ||
%global repo_name bc_osc_codeserver | ||
%global app_name bc_osc_codeserver | ||
%{!?package_version: %define package_version %{major}.%{minor}.%{patch}} | ||
%{!?package_release: %define package_release 1} | ||
%{!?git_tag: %define git_tag v%{package_version}} | ||
%define git_tag_minus_v %(echo %{git_tag} | sed -r 's/^v//') | ||
|
||
Name: ondemand-%{app_name} | ||
Version: %{package_version} | ||
Release: %{package_release}%{?dist} | ||
Summary: Batch Connect - OSC Code Server | ||
|
||
Group: System Environment/Daemons | ||
License: MIT | ||
URL: https://github.com/OSC/%{repo_name} | ||
Source0: https://github.com/OSC/%{repo_name}/archive/%{git_tag}.tar.gz | ||
|
||
Requires: ondemand | ||
|
||
# Disable automatic dependencies as it causes issues with bundled gems and | ||
# node.js packages used in the apps | ||
AutoReqProv: no | ||
|
||
%description | ||
An interactive app designed for OSC OnDemand that launches a Code Server within an Owens batch job. | ||
|
||
|
||
%prep | ||
%setup -q -n %{repo_name}-%{git_tag_minus_v} | ||
|
||
|
||
%build | ||
|
||
|
||
%install | ||
%__mkdir_p %{buildroot}%{_localstatedir}/www/ood/apps/sys/%{app_name} | ||
%__cp -a ./. %{buildroot}%{_localstatedir}/www/ood/apps/sys/%{app_name}/ | ||
echo v%{version} > %{buildroot}%{_localstatedir}/www/ood/apps/sys/%{app_name}/VERSION | ||
|
||
|
||
%files | ||
%defattr(-,root,root) | ||
%{_localstatedir}/www/ood/apps/sys/%{app_name} | ||
%{_localstatedir}/www/ood/apps/sys/%{app_name}/manifest.yml | ||
|
||
|
||
%changelog |
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<% if context.cluster !~ /kubernetes/ -%> | ||
# Wait for the Jupyter server to start | ||
echo "Waiting for Jupyter server to open port ${port}..." | ||
# Wait for the Code Server to start | ||
echo "$(date): Waiting for Code Server to open port ${port}..." | ||
|
||
if wait_until_port_used "${host}:${port}" 600; then | ||
echo "Discovered Jupyter server listening on port ${port}!" | ||
echo "$(date): Discovered code-server listening on port ${port}!" | ||
else | ||
echo "Timed out waiting for Jupyter server to open port ${port}!" | ||
echo "$(date): Timed out waiting for Code Server to open port ${port}!" | ||
clean_up 1 | ||
fi | ||
|
||
sleep 2 | ||
<% end -%> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.