Welcome to SELab! This is a laboratory environment that uses two dockerfiles; dockerfile.tljh
for installing the littlest jupyter hub (tljh), and dockerfile.api
for installing the sysmlv2 API server. Our TLJH setup includes the SysML v2 kernel, and this kernel is modified to point to the SysML v2 API server.
To start the services, run start.sh
script in the root directory:
./start.sh
This will initialize the Docker services, create necessary network configurations and volumes, install the Littlest JupyterHub, including the tljh-shared-directory plugin, and prepare additional conda environments defined by the YAML files placed in the envs
directory.
Before running the start.sh
script, ensure that it has the necessary execution permissions. If you are using a Linux-based system, you can do this by running the following command in your terminal:
chmod +x start.sh
Note: If you get a 'Permission Denied' error when running the start.sh
script, it is likely because you haven't set the script as executable. Please make sure to run the chmod
command above.
After that, the script installs nb_conda_kernels
and creates Jupyter kernels for each Conda environment created.
If you want to create a new environment, place your environment's YAML file into the envs
directory. The script will detect the new file and build the environment automatically.
If you want to add new Python packages to the base environment of the JupyterHub, you can do so by adding them to the requirements.txt
file located in the envs
directory.
After updating the requirements.txt
file, you can rerun the start.sh
script to install the newly added packages in the base environment.
Note: Make sure that each package is on a new line in the requirements.txt
file and the package names are spelled correctly. Also, remember to specify the exact version of the package if needed. For example:
numpy==1.21.0
scipy==1.7.0
pandas
In the example above, the specific versions for numpy and scipy are defined whereas the latest version of pandas will be installed.
Wait for several minutes while the services start. Once ready:
- Access the SysML Server: http://localhost:9000/docs/
- Access the Jupyter Lab: http://localhost:8889/selab/
Log in using admin:admin
credentials. If you see a 404 error, try starting and stopping the server. If the error persists, rerun start.sh
to refresh the TLJH installation. The second run is significantly faster than the initial build.
Tip: During the first load of the sysml API server on port 9000 it may take several minutes for the server to build. You actually have to hit the URL for the server to build so after the install is complete just hit the localhost:9000 URL and wait when its complete you will see --> Welcome to SysML 2.0 REST API implementation!
A config file for TLJH is located in the config
directory. This is where you can set the base_url
(defaulted to selab
in this install), memory, and CPU limits.
If you'd like to pull in sample files to your Jupyter Lab, you can do so by clicking the links below:
These links will automatically clone the repositories and open the README files or notebooks in your current Jupyter Lab environment. If you want to refresh the content from these repositories, simply click the link again.
In case of a persistent 404 error after launching Jupyter Lab, follow these steps:
- Stop and start the server.
- If the issue persists, rerun the
start.sh
script. (Somthing is breaking during the current install and the update fixes it...) - If the issue is still not resolved, please reach out for further support.
Remember, subsequent runs of start.sh
are much quicker than the initial build, so this shouldn't take too much time.
We welcome your feedback and contributions to enhance SELab. Please open an issue or a pull request if you have suggestions for improvements or have identified any bugs.
SELab is released under the MIT License.