Model 2: running JupyterLab on a remote server where your datasets live
Maybe you’ve heard the saying that “data science is anything that causes Excel to crash” The next stage after that is anything that doesn’t fit on a laptop. As your experiments scale, you may run into either
- not enough compute on your laptop
- not enough storage on your laptop
Either way, the solution will probably be for you to get a beefy dev server from your DevOps/IT team. That dev server will be hosted in a lab somewhere that you never physically see. You just access it remotely.
Or maybe it’s simply WFH during Covid that’s caused you to work remotely with machines that you usually work directly on.
The challenge with starting Jupyter on a remote machine is accessing the UI.
Scenario A: there’s no firewall between you and the remote machine
Add the --ip
parameter to your jupyter launch command. It sets the IP address that the notebook server listens on (default value = “localhost”).
jupyter notebook --ip=<remote server IP address> --port=8888
In your laptop browser, instead of navigating to http://localhost:8888/, you can connect directly to the server at http://<remote server IP address>:8888/ instead.
Get fancy:
Are you restarting your Jupyter on your remotehost every time you open your laptop?You can use a terminal multiplexer such as tmux or screen to essentially detach the session on your remotehost. That way, the session doesn’t depend on the connection from your localhost.
For a comparison between tmux and screen, you can check out this StackExchange post , but as the header warning states, it’s an opinion-based question.
Scenario B: your notebook server is running somewhere behind a firewall, like in the public cloud.
Instructions vary per cloud vendor (see below), but the high level steps are:
- Launch jupyter from within your remote server
- From your local machine, configure port forwarding.
Port forwarding?
When you start a Jupyter server, by default, the GUI is hosted on a port on the machine where the server is launched . In this scenario, port forwarding tells your local machine to take any traffic for a specific local port and forward it to a port on a remote machine. ( Further reading: The Missing Semester of Your CS Education )Vendor specific instructions:
AWS
– Official documentation: Set up Jupyter for the AWS Deep Learning AMI
GCP
– Official documentation: Connecting to JupyterLab for the Deep Learning VM Image
– User example (includes changing your instance’s firewall settings as an alternative to port forwarding)
Azure
– Official documentation: Configure Jupyter in a Azure Machine Learning dev environment (uses Azure Notebooks as the server)
Related Articles
Request for deletion
About
MC.AI – Aggregated news about artificial intelligence
MC.AI collects interesting articles and news about artificial intelligence and related areas. The contributions come from various open sources and are presented here in a collected form.
The copyrights are held by the original authors, the source is indicated with each contribution.
Contributions which should be deleted from this platform can be reported using the appropriate form (within the contribution).
MC.AI is open for direct submissions, we look forward to your contribution!
Search on MC.AI
mc.ai aggregates articles from different sources - copyright remains at original authors
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
数据结构、算法与应用
(美)Sartaj Sahni / 汪诗林、孙晓东、等 / 机械工业出版社 / 2000-01 / 49.00
本书是关于计算机科学与工程领域的基础性研究科目之一――数据结构与算法的专著。 本书在简要回顾了基本的C++ 程序设计概念的基础上,全面系统地介绍了队列、堆栈、树、图等基本数据结构,以及贪婪算法、分而治之算法、分枝定界算法等多种算法设计方法,为数据结构与算法的继续学习和研究奠定了一个坚实的基础。更为可贵的是,本书不仅仅介绍了理论知识,还提供了50多个应用实例及600多道练习题。 本书......一起来看看 《数据结构、算法与应用》 这本书的介绍吧!