$ sudo systemctl enable ipython-notebook Security note In order to have your Jupyter server started up automatically on boot, do: Now, once you aim your browser to the server home page and go to start a new notebook, you can pick up any conda environment you have created earlier. You should be able to check your service with: Okay, so once you have created /lib/systemd/system/rvice with above content, issue the following commands: Full jupyter-notebook set of packages is not required in this env! The latter package is needed so that python enterpreter from dsenv can server as jupyter kernel for the notebook. $ conda create -n dsenv python=3.7 pandas matplotlib ipykernel Then, you can create your Data Science environment with just a jupyter client package: $ conda create -n notebook_env python=3.7 notebook nb_conda_kernels I install it in a dedicated env, in order not to mix it with “real” working environments: I do this with a help of nb_conda_kernels extension of Jupyter. I have a special setup that allows to run a notebook instance with any conda environments I create. You’ll notice that I call jupyter-notebook from a notebook_env environment. service file for a Jupyter server: Description=IPython notebook Type=simple PIDFile=/var/run/ipython-notebook.pid Environment="PATH=/home/artem/miniconda3/envs/notebook_env/bin:/home/artem/miniconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ExecStart=/home/artem/miniconda3/envs/notebook_env/bin/jupyter-notebook -no-browser -notebook-dir=/home/artem -NotebookApp.token='my_pasword' -ip=0.0.0.0 User=artem Group=artem WorkingDirectory=/home/artem WantedBy=multi-user.target In systemd realm, you describe your daemon in a service file. The reality is, most modern Linux distros (Ubuntu 18.04 in my case) use systemd. Let’s skip this step and setup an instance with autostart of Jupyter notebook server at boot time. When you rent an instance in a cloud and want to run a Jupyter notebook, you’ll typically need to login to the instance and start the Jupyter server. Setup Jupyter Notebook Server to Start Up on Boot and Use Different Conda Environments.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |