Skip to content

Instantly share code, notes, and snippets.

@karino2
Last active December 20, 2017 04:28
Show Gist options
  • Save karino2/57e68c82f8a1d2899c326e28488664e6 to your computer and use it in GitHub Desktop.
Save karino2/57e68c82f8a1d2899c326e28488664e6 to your computer and use it in GitHub Desktop.
For execution from android phone.
# notebook.sh
#!/bin/sh
jupyter-notebook --ip=0.0.0.0 2>&1 | tee notebook_output.log | sed -n "/^ *http.*8888/s/ *http.*token=//p"
# note_on_docker.sh
#!/bin/bash
pushd ~/ClassSim;
docker run -it --rm --publish 52688:8888 --publish 6006:6006 -v $(pwd):/work arino/tfcpu2 /work/notebook.sh
# nt.sh
#!/bin/bash
screen -dmS ntsession bash;
sleep 0.1 && screen -S ntsession -X stuff $'note_on_docker.sh\n';
sleep 0.1 && screen -r ntsession;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment