-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·49 lines (41 loc) · 2.06 KB
/
install.sh
File metadata and controls
executable file
·49 lines (41 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
#
# SysML 2 Pilot Implementation
# Copyright (C) 2020 California Institute of Technology ("Caltech")
# Copyright (C) 2021 Twingineer LLC
# Copyright (C) 2021 Model Driven Solutions, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# @license LGPL-3.0-or-later <http://spdx.org/licenses/LGPL-3.0-or-later>
#
set -e
SYSML_VERSION="${project.version.unqualified}"
echo "--- Step 1: Testing Conda installation ---"
command -v conda || (echo "Conda is not installed. Please install Conda and re-run." && return 1)
conda --version
echo "--- Step 2: Testing Java installation ---"
command -v java || (echo "Java is not installed. Please install Java and re-run." && return 1)
java -version
echo "--- Step 3: Installing Jupyter SysML kernel and dependencies ---"
jupyter kernelspec remove sysml -f > /dev/null 2>&1 || true
conda install "jupyter-sysml-kernel=$SYSML_VERSION" python=3.* jupyterlab=4.* graphviz=2.* nodejs -c conda-forge -y
echo "--- Step 4: Installing JupyterLab SysML extension ---"
jupyter labextension uninstall @systems-modeling/jupyterlab-sysml > /dev/null 2>&1 || true
jupyter labextension install "@systems-modeling/jupyterlab-sysml@$SYSML_VERSION"
echo "--- Step 5: Customizing JupyterLab ---"
python3 "$(dirname $0)/install.py"
echo "--- Step 6: Running Jupyter environment ---"
echo "To launch JupyterLab you can now run \"jupyter lab\" from Command Prompt."
echo "Re-running this script is not necessary and will re-install the environment."
printf "\n\n"