Looking to pass in --LabApp.allowed_extensions_uris=... when starting jupyter lab ontop of jupyter hub. It does not pick this up, or --LabServerApp either.
Whats the correct way to propagate Jupyter lab arguments through Jupyter hub?
Related
I am learning to use Azure Machine Learning. it has its Notebooks (which are ok!) and also it allows me to use Jupyter Notebook and VSCode.
However I am wondering if there is a way to efficiently use Spyder with Azure Machine Learing.
eg. I was able to install R-Studio as a custom application using a docker image using steps provided here Stackoverflow link
Spyder supports connecting to a Remote Python kernel, it does, however require SSH.
You can enable SSH on your Compute Instance (see below), but only when you set it up. Also, many companies have policies against enabling SSH, so this might not work for you. If it doesn't, I can highly recommend VSCode.
I'm referring to some docs and tutorials for the Azure DP-100 Exam related to Data Science.
On creating a Compute Instance (STANDARD_DS11_V2), I opened the Jupyter notebook, and cloned a sample repository (https://github.com/microsoftdocs/ml-basics)
After this, I'm not able to load or see the files inside the ml-basics folder on Jupyter.
Nothing happens on clicking on ml-basics folder, apart from the below error message after a long wait -
Timed out attempting to connect to this compute instance.
Check to make sure the compute instance is started. If you just started it, try again in a minute or two.
I'm not able to reproduce this issue, works fine for me. As mentioned in the error message, ensure your instance is up and running. If it is, try restarting it and also ensure there are no firewalls blocking your connection.
I have been working on a GCP AI Notebook for the past couple of weeks when I got '524 error'. I followed the troubleshooting instructions here. I connected to the notebook instance via ssh and restarted the Jupyter service. I am now able to open JupyterLab but I can't find any of my work!! Here is the JupyterLab screenshot. I searched for the files using Terminal in JupyterLab as well as the Cloud Shell but nothing. It looks as if my instance had been wiped clean.
Please help, I lost all my code I have been working on for the past couple of weeks.
Based on the Terminal output, seems to be you are using a Container based instance.
This means that you have a base OS and a Docker instance running JupyterLab service on top. I will be interested in knowing what Docker instance is that you are running. Is this a Deep Learning Container?
By default (If using Deep Learning Containers) files are stored in /home/jupyter and this folder is mapped to local disk so you can see if there is something inside jupyter. Do you have something there?
You can SSH into Jupyter instance and verify which is your container and parameters passed.
sudo docker ps --no-trunc
I have a Juypter Notebook set up within AWS Sagemaker. I wanted to find a way to launch this notebook on an autonomous trigger when a new file is uploaded to a certain folder (hence AWS Lambda). I was looking for if there was a streamlined way to trigger a Juypter Notebook with an AWS Lambda trigger.
I have looked into using API and turning Sagemaker into and endpoint, but it didnt work.
*edit Sorry if the question was a little vague. I have allot of code written in this notebook on in Juypter. What i was ideally looking for was, when a file is uploaded to "RandomFile" then the code within the notebook will run. I was looking to do this with AWS Lambda by setting up a S3 based trigger.
Thanks for using Amazon SageMaker! Very interesting use case!
Currently, there isn't any direct way to trigger the execution of a Jupyter Notebook upon an S3-based trigger, but there are a few ways you might be able to accomplish this:
SQS-based solution
Configure your S3 bucket to send Event Notifications to send messages to an SQS queue.
Configure a cron job on your SageMaker Notebook Instance that continually polls the queue for work.
Example shell-script based SQS poller - any language of course would work.
Example configuration of a cron job in a Lifecycle Configuration
When a message is detected by the poller, execute nbconvert or papermill (as suggested by Guy) on your notebook.
Configure a CloudWatch Alarm on the size of your SQS Queue, so you are alerted if your cron job is no longer working.
Then, just leave the Notebook Instance up-and-running at all times, and it should detect when objects are uploaded to S3.
Lambda and Step Functions Solution
This solution is a bit more complex, but has the advantage of being more cost-effective if you don't want your Notebook Instance running at all times.
Configure your Notebook Instance with a Lifecycle Configuration which does the following:
Pull the file from S3
Run nbconvert in the background.
Upload the result of nbconvert to S3.
Configure your S3 bucket to sent Event notifications to Amazon Step Functions.
Create a Step Functions State Machine which has the following steps:
Start your notebook instance
Wait for the result of nbconvert to be uploaded to S3.
Stop the notebook instance.
Other Solutions
Use the nbconvert RESTful API. The nbconvert API is available at /api/nbconvert, however it's not well-documented from what I can tell. To do this in a Lambda function, you can get a Presigned URL to the Notebook Instance and then interact with this API via the Python Requests library (or similar). I haven't tested this, however, so YMMV.
I am very impressed with IPython Notebook, and I'd like to use it more extensively. My question has to do with secure data. I know only very little about networking. If I use IPython Notebook, is the data sent out over the web to a remote server? Or is it all contained locally? I am not talking about setting up a common resource for multiple access points, just using the data on my machine as I would with SAS or R.
Thanks
If you run the notebook on your machine, then no, it doesn't send anything externally. There are sites like Wakari where you can use the IPython notebook that's running on a server, and obviously that will send your code and data to their servers.
If you did want to expose your notebook server on the internet, then there are security measures that you should take, but that's not necessary if you're just running ipython notebook locally, which is the default way it starts up.