Skip to content

Commit

Permalink
feat: add binder
Browse files Browse the repository at this point in the history
  • Loading branch information
vishwa2710 committed Dec 7, 2023
1 parent 98d3695 commit 5b223c7
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The Open Space Toolkit (**OSTk**) is a collection of versatile libraries for aer

Want to get started? This is the simplest and quickest way:

[![JupyterHosted](https://img.shields.io/badge/JupyterLab-white?logo=jupyter)](https://open-space-toolkit-r22wh5qixa-uc.a.run.app/lab/tree/notebooks)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/open-space-collective/open-space-toolkit/main?urlpath=lab/tree/notebooks)

*This will automatically start a [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/) environment in your web browser with Open Space Toolkit libraries and example notebooks ready to use. Nothing to download or install! 🚀*

Expand Down
39 changes: 39 additions & 0 deletions binder/postBuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

################################################################################################################################################################

# @project Open Space Toolkit
# @file binder/postBuild
# @author Lucas Brémond <lucas@loftorbital.com>
# @license Apache License 2.0

################################################################################################################################################################

# Install Jupyter widgets extension

jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build

# Install Matplotlib for JupyterLab

jupyter labextension install jupyter-matplotlib --no-build

# Install Plotly for JupyterLab

## FigureWidget support

jupyter labextension install plotlywidget --no-build

## JupyterLab renderer support

jupyter labextension install jupyterlab-plotly --no-build

## Build extensions (must be done to activate extensions since --no-build is used above)

jupyter lab build

# Install Open Space Toolkit default datasets

mkdir -p /home/jovyan/open-space-toolkit/physics
gsutil -m cp -r gs://open-space-toolkit/physics /home/jovyan/open-space-toolkit/

################################################################################################################################################################
14 changes: 14 additions & 0 deletions binder/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Apache License 2.0

gsutil~=4.47

jupyterlab_launcher>=0.5

ipywidgets~=7.5
ipympl~=0.4
plotly~=5.5
plotly-geo~=1.0

pandas~=2.1

open-space-toolkit-astrodynamics~=5.1
3 changes: 3 additions & 0 deletions binder/runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Apache License 2.0

python-3.10
19 changes: 19 additions & 0 deletions binder/start
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
# Apache License 2.0

export LD_LIBRARY_PATH=/srv/conda/lib/

export OSTK_PHYSICS_COORDINATE_FRAME_PROVIDERS_IERS_MANAGER_MODE="Automatic"
export OSTK_PHYSICS_COORDINATE_FRAME_PROVIDERS_IERS_MANAGER_LOCAL_REPOSITORY="/home/jovyan/open-space-toolkit/physics/coordinate/frame/providers/iers"
export OSTK_PHYSICS_COORDINATE_FRAME_PROVIDERS_IERS_MANAGER_REMOTE_URL="https://storage.googleapis.com/loft-orbital-open-space-toolkit/physics/coordinate/frame/providers/iers/latest/"
export OSTK_PHYSICS_ENVIRONMENT_EPHEMERIDES_SPICE_ENGINE_MODE="Automatic"
export OSTK_PHYSICS_ENVIRONMENT_EPHEMERIDES_SPICE_MANAGER_LOCAL_REPOSITORY="/home/jovyan/open-space-toolkit/physics/environment/ephemerides/spice"
ENV OSTK_PHYSICS_ENVIRONMENT_EPHEMERIDES_SPICE_MANAGER_REMOTE_URL "https://storage.googleapis.com/loft-orbital-open-space-toolkit/physics/environment/ephemerides/spice/"
export OSTK_PHYSICS_ENVIRONMENT_GRAVITATIONAL_EARTH_MANAGER_ENABLED=true
export OSTK_PHYSICS_ENVIRONMENT_GRAVITATIONAL_EARTH_MANAGER_LOCAL_REPOSITORY="/home/jovyan/open-space-toolkit/physics/environment/gravitational/earth"
export OSTK_PHYSICS_ENVIRONMENT_GRAVITATIONAL_EARTH_MANAGER_REMOTE_URL="https://storage.googleapis.com/loft-orbital-open-space-toolkit/physics/environment/gravitational/earth/"
export OSTK_PHYSICS_ENVIRONMENT_MAGNETIC_EARTH_MANAGER_ENABLED=true
export OSTK_PHYSICS_ENVIRONMENT_MAGNETIC_EARTH_MANAGER_LOCAL_REPOSITORY="/home/jovyan/open-space-toolkit/physics/environment/gravitational/earth"
export OSTK_PHYSICS_ENVIRONMENT_MAGNETIC_EARTH_MANAGER_REMOTE_URL="https://storage.googleapis.com/loft-orbital-open-space-toolkit/physics/environment/magnetic/earth/"

exec "$@"

0 comments on commit 5b223c7

Please sign in to comment.