Forked from nathanielobrown/install_jupyterlab_launch_agent.sh
Last active
April 19, 2019 02:43
-
-
Save trungdq88/ac0b8d4136dc9d7bbd1f5d8f1e9c9879 to your computer and use it in GitHub Desktop.
script to install a jupyter lab launch agent on MacOS
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
cat <<EOF > ~/Library/LaunchAgents/com.$(whoami).jupyterlab.plist | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>KeepAlive</key> | |
<true/> | |
<key>Label</key> | |
<string>com.$(whoami).jupyterlab</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>$(which jupyter)</string> | |
<string>lab</string> | |
<string>--notebook-dir=/Users/$(whoami)/Documents/jupyter-lab/</string> | |
<string>--no-browser</string> | |
<string>--port</string> | |
<string>5887</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
</dict> | |
</plist> | |
EOF | |
launchctl load ~/Library/LaunchAgents/com.$(whoami).jupyterlab.plist | |
open http://localhost:5887/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment