Created
September 3, 2020 02:43
-
-
Save andrea-fantini/09d9216acba8df76a5f638891e18c91d to your computer and use it in GitHub Desktop.
Simple bash script to start Jupyter notebooks server
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
#!/bin/bash | |
# Simple bash script to start automated launching jupyter notebook servers accessible via LAN | |
# Every time I want to start a notebook I need to activate my conda base environment, check the local IP, and launch the server with that IP. This script automates that process. | |
source $(conda info --base)/etc/profile.d/conda.sh | |
conda activate base | |
echo 'Activated environment :' $CONDA_DEFAULT_ENV | |
my_ip=$(hostname -I) | |
echo 'Local IP address :' $my_ip | |
echo 'Launching Jupyter Notebook server' | |
jupyter notebook --ip $my_ip --port 8888 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment