Amo ipython, in particolare la funzione notebook. Attualmente mantengo una sessione di schermo in esecuzione con il processo del blocco. Come aggiungerei il motore/il server Web di ipython alle procedure di avvio del mio sistema (CentOS5)?Come avviare il server notebook ipython all'avvio come daemon
18
A
risposta
6
Forse mettere qualcosa come:
cd /path/to/notebookdir && ipython notebook --no-browser &
in /etc/rc.d/rc.local
? Questo è il modo "facile", penso che se sia solo la tua macchina personale, ma se si tratta di un server "reale" dovresti probabilmente fare una cosa Sys V-init completa; vedi this question per ulteriori
3
Suppongo che tu non voglia eseguire il programma come root. Quindi questa è la mia versione modificata che viene eseguito come <username>
(messo in /etc/rc.local
prima della linea exit 0
):
su <username> -c "/usr/bin/ipython notebook --no-browser --profile <profilename> &"
È possibile controllare per assicurarsi che l'ipython è in quel percorso con which ipython
. Anche se potresti essere in grado di farla franca senza aver completato la strada.
6
vi /usr/lib/systemd/system/ipython-notebook.service
#put the following in there.
-----------------8<------------------
[Unit]
Description=IPython notebook
[Service]
Type=simple
PIDFile=/var/run/ipython-notebook.pid
ExecStart=/usr/bin/ipython notebook --no-browser
User=ipynb
Group=ipynb
WorkingDirectory=/home/ipynb/notebooks
[Install]
WantedBy=multi-user.target
-----------------8<------------------
# useradd ipynb
# su - ipynb # go there create notebooks dir
# systemctl daemon-reload
# systemctl enable ipython-notebook
# systemctl start ipython-notebook
Problemi correlati
- 1. "Salva come" nel notebook IPython
- 2. Come chiudere correttamente Notebook IPython?
- 3. Esegui notebook ipython da un server remoto
- 4. Carica dati locali nel server notebook IPython
- 5. Come avviare un daemon all'avvio del server in primavera
- 6. Impossibile avviare ipython notebook manca un modulo chiamato zmq.eventloop
- 7. Notebook Ipython Funzionante solo come root
- 8. Notebook IPython su Heroku
- 9. Come memorizzare nella cache in Notebook IPython?
- 10. IPython notebook: come impostare l'intervallo cursore
- 11. Come si sopprime l'output in IPython Notebook?
- 12. Notebook IPython con optirun
- 13. Collegamenti tra notebook IPython
- 14. Avvio del notebook ipython
- 15. Download file di trigger nel notebook iPython
- 16. Esegui localmente il visualizzatore di Notebook IPython
- 17. Errore durante il caricamento del notebook IPython
- 18. Come chiamare il modulo scritto con argparse nel notebook iPython
- 19. Come ottenere il nome corrente del notebook IPython
- 20. Aggiornare dinamicamente il grafico nel notebook iPython
- 21. Editor esterno per notebook IPython
- 22. ipython cellulari Notebook uscite multiple
- 23. ipython: il notebook non sembra essere JSON
- 24. Come avviare il server Postgres?
- 25. ipython: server di accesso remoto notebook tramite un browser web
- 26. Notebook IPython Sympy Math Rendering
- 27. Come avviare e arrestare un daemon di shell da Ruby
- 28. Errore Pyzmq nel notebook IPython
- 29. Download CSV da un notebook iPython
- 30. Esiste un'API per notebook IPython?
si consiglia inoltre di specificare l'opzione 'dir' --notebook- – Constantino