Jupyter Notebook es una aplicación web interactiva para escribir y compartir código, ecuaciones, visualizaciones y texto narrativo. Es muy usada en ciencia de datos y educación.
Requisitos
Necesita Ubuntu 18.04 con al menos 2 GB de memoria, Python 3, Nginx y acceso SSH root.
Crear usuario
ssh root@IP_del_servidor lsb_release -a apt update apt upgrade adduser jupyter usermod -aG sudo jupyter su - jupyter sudo apt install python3-pip python3-dev
Entorno virtual
virtualenv jnotebook source jnotebook/bin/activate
Instalar Jupyter
pip install jupyter
Ejecutar
jupyter notebook jupyter notebook --ip='1.2.3.4' jupyter notebook --generate-config jupyter notebook password
Servicio systemd
Cree un archivo de servicio para que Jupyter siga activo tras cerrar sesión.
sudo nano /etc/systemd/system/jupyter.service sudo systemctl daemon-reload sudo systemctl enable jupyter sudo systemctl start jupyter
Nginx
Cree un bloque de servidor que redirija al puerto local de Jupyter, habilite acceso remoto y reinicie servicios.
sudo nginx -t sudo systemctl restart nginx sudo systemctl restart jupyter