-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathrun-jupyter.sh
26 lines (20 loc) · 870 Bytes
/
run-jupyter.sh
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
#!/bin/bash
# Get the directory path where the shell script is located
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Check if the virtual environment already exists in the script's directory
if [ -f "$script_dir/nmrfilter_env/bin/activate" ]; then
echo "NMRfilter_env already exists. Activating..."
source "$script_dir/nmrfilter_env/bin/activate"
else
echo "Creating virtual environment in $script_dir/nmrfilter_env..."
python3 -m venv "$script_dir/nmrfilter_env"
source "$script_dir/nmrfilter_env/bin/activate"
echo "Installing the requirements..."
python -m pip install -r requirements.txt
echo "Installing Jupyter Notebook..."
python -m pip install jupyter
fi
# Start Jupyter Notebook
jupyter notebook
# You may add 'read' command here to pause the script before exiting
# read -p "Press Enter to exit..."