Is jupyter replicating my data to a cloud server - python

This is a pretty simple question. I if you download jupyter as a part of Anaconda. How is your data being secured. When I run jupyter it does go straight to an html page, but that page displays my local folders on the servers I am connected to.
If I make a notebook, will that notebook be stored on a cloud server. Where does it go, and how can I keep all of my filee ("notebooks) local?

Jupyter uses no cloud services, and should make no external requests when you are running it locally. The best way to think of a local install of Jupyter notebook is a desktop application that happens to use your web browser for its UI. It talks to the local filesystem, and relays that data to your browser over HTTP on localhost.

Related

What's the best way of sharing jupyter notebook script with others to be able to run it on their windows computer?

I just wrote a script in jupyer notebook and I'm wondering what's the best format I should save this file as if I want to share it with other people so they can run it on their windows computer? I tried to convert my .ipynb to both .py and .exe, but none seem to work... maybe I'm doing something wrong.
Converting a Jupyter Notebook to a .py or .exe file would make no sense, as notebooks are used for the purpose to execute certain blocks of code on click. You could convert the notebook and it's output to a .pdf File, as you can read here: How to convert IPython notebooks to PDF and HTML?
If you want to port your Jupyter Notebook to a Python file, you'd have to make sure that you include all the code in the .py file, which is written down in the notebook as well. Keep in mind that, when using a regular Python File, things obviously won't look as great as in Jupyter.
The best way to share your Notebooks, would be to send them the actual file, so they can open the notebook in Jupyter notebook, or - in case they don't want to install Jupyter or Python on their device - they could use an online version of Jupyter Notebook like: https://nbviewer.jupyter.org/ - There are multiple websites available, which offer that kind of service.
You can try to use Mercury framework for converting Jupyter Notebook into web application. The Mercury can generate the widgets for your notebook, so don't need to use GUI packages (like tkinter). The widgets are generated by YAML header. Widgets are connected with variables in the notebook code. Your users can change the widgets values and execute the notebook. The final result can be easily exported to PDF. You can read more in the tutorial on how to share Jupyter Notebook with non-technical users.
The example notebook with YAML header
The example notebook converted to web app
Please notice that notebook's code is hidden (show-code: False in the YAML).
The Mercury can be easily deployed to Heroku or any cloud provider (Digital Ocean, GCP, Azure, AWS), please check the docs for details. You just send the server URL to share the app.

Python Jupyter Notebook expose local data in the web?

I'm a total noob at Python, I just downloaded Anaconda and started to use Jupyter Notebook.
I was wondering: since Jupyter Notebook looks web based, should I have any privacy concerns using it? i.e. are the data on my pc exposed out in the web?
You probably shouldn't worry about running notebooks on your localhost. If you want more info (e.g. if you ever intend to run your notebook at a remote server), this link will give you some insight regarding security concerns.
TL;DR: no, your data are not exposed.

How to allow users to run jupyter notebooks stored in my database on my server?

I have a problem and I need a hint how to approach the problem.
I have django application, in which I have sme jupyter notebooks stored in my database. At this point, users can download notebooks and run them on their compuers.
I would like to add functionality, where user could run notebook online. I was thinking of two solutions:
first one is to use some free to use online service, like google colab, but I haven't found any with api where I could send file from my database (maybe you know about some?),
second is to run jupyter hub on my server. I saw how to run jupyter hub remotely, but I don't know how to grant users the access, so they can run notebooks simultaneously, and they don't have access to server itself thorugh it, and do all of this in django.
Do you have any hints that could help me get this functionality?
JupyterHub is a good approach if you trust your users. However, if you want to run untrusted code (like Google Colab does), you need sandboxing. In that case, you can use a Docker image to run notebooks. For example, mikebirdgeneau/jupyterlab. And there is a docker-compose file example: https://github.com/mikebirdgeneau/jupyterlab-docker/blob/master/docker-compose.yml

How do I check why a Kubernetes webpage keeps loading?

I followed this Google cloud Kubernetes tutorial for python. I basically changed what's in their hello world function to plot with matplotlib (with some other functions beforehand to get data to plot). It all worked (with some changes to the dockerfile, to pip install modules, and use just python 3.7 instead of the slim version) until where it says to view a deployed app. I copy the external IP and try it in the browser, but it just loads. I'm not sure what to check to see why it won't finish loading.
So I'm wondering how I check where the problem is. The python code works fine elsewhere, outputting a plot with flask on a local computer
You can try proxying from your localhost directly to the pod to see if there's a problem with the load balancer.
kubectl port-forward your-pod-xxxxxxxxxx-xxxxx <local-port>:<pod-port>
Then you can just hit http://172.0.0.1:<local-port> on your browser.
You can also take a look at the pod logs:
kubectl logs your-pod-xxxxxxxxxx-xxxxx

Hosting a Pytorch Environment on Azure with Jupyter Notebooks usng Active Directory Authentication

I am looking for a way for non-technical employees within my company to access a Jupyter Notebook hosted on a python environment (with pytorch) hosted on Azure, with active directory authentication. I do not want to use the Azure Machine Learning tools. The goal is to setup an Azure VM with the Jupyter Notebook script along with the necessary dataset/files that the script needs to access existing in the VM's resources. A simple use case would be a user clicks a link directing them to Active Directory authentication, then once logged in, takes them directly to the Jupyter notebook containing a single script that the user can execute, but not edit. The VM also needs to have dependencies such as Pytorch and Scikit-learn. Does anybody know a possible solution to this?
I would use notebooks.azure.com, however there is no current functionality for privately sharing notebooks.

Categories