Created
May 26, 2018 09:02
-
-
Save MMesch/24bb44132957f78001d25287255c9648 to your computer and use it in GitHub Desktop.
jupyter kernel gateway communication from bash
This file contains hidden or 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
#!/usr/bin/env bash | |
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT | |
echo -e "\n==== START GATEWAY ====" | |
jupyter kernelgateway --JupyterWebsocketPersonality.list_kernels=True & | |
sleep 3 | |
echo -e "\n==== PING GATEWAY API ====" | |
curl localhost:8888/api | |
echo -e "\n==== START KERNEL ====" | |
curl -X POST -d '{"name": "python3"}' localhost:8888/api/kernels | |
echo -e "\n==== GET LIST OF RUNNING KERNELS ====" | |
curl -X GET localhost:8888/api/kernels | |
echo -e "\n\e[32m==== ALL DONE ====\e[39m" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment