python.docker interpreter not working

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

python.docker interpreter not working

Cyril Scetbon
Hey guys,

I’m trying to use python.docker but activating an image doesn’t work. I’m using version Zeppelin 0.7.3 



Docker is installed on my machine :

docker run -ti python:2.7 python -V                                                                                                                                     100%   15:11:16
Python 2.7.14

And this is what I see in Zeppelin logs :

WARN [2017-10-04 15:10:35,998] ({pool-2-thread-34} NotebookServer.java[afterStatusChange]:2064) - Job 20171004-150341_2114032812 is finished, status: ERROR, exception: null, result: %text Not supported command: activate python:2.7
print ‘nothing'

Thanks
Cyril Scetbon

Reply | Threaded
Open this post in threaded view
|

RE: python.docker interpreter not working

David Howell

Hi Cyril, I found a gif in the original Jira ticket showing how this would work. It appears that it works similarly to %python.conda

 

You would use %python.docker in one paragraph to activate the container, and just %python in the next paragraph to execute python in the context of that docker:

 

https://cloud.githubusercontent.com/assets/1540981/20421814/38a93a9c-ad1b-11e6-8a64-2d0230ff4d8a.gif

 

From: [hidden email]
Sent: Thursday, 5 October 2017 6:13 AM
To: [hidden email]
Subject: python.docker interpreter not working

 

Hey guys,

I’m trying to use python.docker but activating an image doesn’t work. I’m using version Zeppelin 0.7.3 



Docker is installed on my machine :

docker run -ti python:2.7 python -V                                                                                                                                     100%   15:11:16
Python 2.7.14

And this is what I see in Zeppelin logs :

WARN [2017-10-04 15:10:35,998] ({pool-2-thread-34} NotebookServer.java[afterStatusChange]:2064) - Job 20171004-150341_2114032812 is finished, status: ERROR, exception: null, result: %text Not supported command: activate python:2.7
print ‘nothing'

Thanks
Cyril Scetbon

Reply | Threaded
Open this post in threaded view
|

Re: python.docker interpreter not working

Cyril Scetbon
Oh thanks David, interesting, however that’s super counterintuitive .. Then how do you manage to you use one version in a paragraph and another one somewhere else ? Does it mean that you need to use the same one for all the paragraphs you’re working on ?
Because I’m wondering how it does as Zeppelin is supposed to run all paragraphs in parallel.

On Oct 4, 2017, at 4:27 PM, David Howell <[hidden email]> wrote:

Hi Cyril, I found a gif in the original Jira ticket showing how this would work. It appears that it works similarly to %python.conda
 
You would use %python.docker in one paragraph to activate the container, and just %python in the next paragraph to execute python in the context of that docker:
 
 
From: [hidden email]
Sent: Thursday, 5 October 2017 6:13 AM
To: [hidden email]
Subject: python.docker interpreter not working
 
Hey guys,

I’m trying to use python.docker but activating an image doesn’t work. I’m using version Zeppelin 0.7.3 

<Screen Shot 2017-10-04 at 3.08.54 PM.png>

<Screen Shot 2017-10-04 at 3.10.38 PM.png>

Docker is installed on my machine :

docker run -ti python:2.7 python -V                                                                                                                                     100%   15:11:16
Python 2.7.14

And this is what I see in Zeppelin logs :

WARN [2017-10-04 15:10:35,998] ({pool-2-thread-34} NotebookServer.java[afterStatusChange]:2064) - Job 20171004-150341_2114032812 is finished, status: ERROR, exception: null, result: %text Not supported command: activate python:2.7
print ‘nothing'

Thanks
Cyril Scetbon

Reply | Threaded
Open this post in threaded view
|

RE: python.docker interpreter not working

David Howell

The context of an interpreter is global by default, but you can set the scope to be isolated per note, which would allow you do have a different %python in different notes.

You could also create a second python interpreter as a copy and call it something different like %python27 or %python36

 

 

 

From: Cyril Scetbon [mailto:[hidden email]]
Sent: Thursday, 5 October 2017 8:14 AM
To: David Howell <[hidden email]>
Cc: [hidden email]
Subject: Re: python.docker interpreter not working

 

Oh thanks David, interesting, however that’s super counterintuitive .. Then how do you manage to you use one version in a paragraph and another one somewhere else ? Does it mean that you need to use the same one for all the paragraphs you’re working on ?

Because I’m wondering how it does as Zeppelin is supposed to run all paragraphs in parallel.

 

On Oct 4, 2017, at 4:27 PM, David Howell <[hidden email]> wrote:

 

Hi Cyril, I found a gif in the original Jira ticket showing how this would work. It appears that it works similarly to %python.conda

 

You would use %python.docker in one paragraph to activate the container, and just %python in the next paragraph to execute python in the context of that docker:

 

 

From: [hidden email]
Sent: Thursday, 5 October 2017 6:13 AM
To: [hidden email]
Subject: python.docker interpreter not working

 

Hey guys,

 

I’m trying to use python.docker but activating an image doesn’t work. I’m using version Zeppelin 0.7.3 

 

<Screen Shot 2017-10-04 at 3.08.54 PM.png>

 

<Screen Shot 2017-10-04 at 3.10.38 PM.png>

 

Docker is installed on my machine :

 

docker run -ti python:2.7 python -V                                                                                                                                     100%   15:11:16

Python 2.7.14

 

And this is what I see in Zeppelin logs :

 

WARN [2017-10-04 15:10:35,998] ({pool-2-thread-34} NotebookServer.java[afterStatusChange]:2064) - Job 20171004-150341_2114032812 is finished, status: ERROR, exception: null, result: %text Not supported command: activate python:2.7

print ‘nothing'

 

Thanks

Cyril Scetbon

 

Reply | Threaded
Open this post in threaded view
|

Re: python.docker interpreter not working

Cyril Scetbon
But python.docker needs to be activated in one note and used in another, how then could you use %python.docker and %python in different notes ? I suppose it's possible if you manually run each note sequentially but not if you choose to run all notes contained in a notebook ? (Using the run all at the top of the notebook)

Cyril Scetbon

On Oct 4, 2017, at 5:31 PM, David Howell <[hidden email]> wrote:

The context of an interpreter is global by default, but you can set the scope to be isolated per note, which would allow you do have a different %python in different notes.

You could also create a second python interpreter as a copy and call it something different like %python27 or %python36

 

 

 

From: Cyril Scetbon [[hidden email]]
Sent: Thursday, 5 October 2017 8:14 AM
To: David Howell <[hidden email]>
Cc: [hidden email]
Subject: Re: python.docker interpreter not working

 

Oh thanks David, interesting, however that’s super counterintuitive .. Then how do you manage to you use one version in a paragraph and another one somewhere else ? Does it mean that you need to use the same one for all the paragraphs you’re working on ?

Because I’m wondering how it does as Zeppelin is supposed to run all paragraphs in parallel.

 

On Oct 4, 2017, at 4:27 PM, David Howell <[hidden email]> wrote:

 

Hi Cyril, I found a gif in the original Jira ticket showing how this would work. It appears that it works similarly to %python.conda

 

You would use %python.docker in one paragraph to activate the container, and just %python in the next paragraph to execute python in the context of that docker:

 

 

From: [hidden email]
Sent: Thursday, 5 October 2017 6:13 AM
To: [hidden email]
Subject: python.docker interpreter not working

 

Hey guys,

 

I’m trying to use python.docker but activating an image doesn’t work. I’m using version Zeppelin 0.7.3 

 

<Screen Shot 2017-10-04 at 3.08.54 PM.png>

 

<Screen Shot 2017-10-04 at 3.10.38 PM.png>

 

Docker is installed on my machine :

 

docker run -ti python:2.7 python -V                                                                                                                                     100%   15:11:16

Python 2.7.14

 

And this is what I see in Zeppelin logs :

 

WARN [2017-10-04 15:10:35,998] ({pool-2-thread-34} NotebookServer.java[afterStatusChange]:2064) - Job 20171004-150341_2114032812 is finished, status: ERROR, exception: null, result: %text Not supported command: activate python:2.7

print ‘nothing'

 

Thanks

Cyril Scetbon