Docker Image for Sympy

211 views
Skip to first unread message

Sartaj Singh

unread,
Jun 27, 2016, 2:26:22 PM6/27/16
to sympy
Hi,

I was playing around with docker. It occurred to me that it will be nice to have an official sympy docker image. This could be useful in the tutorials as people are not expected to install anything but just pull the image. I tried to google and find if there is a sympy image already but I couldn't find much. Do we want something like this? Let me know if it's a good idea. I can go ahead and make an image for sympy.

Ondřej Čertík

unread,
Jun 27, 2016, 2:40:21 PM6/27/16
to sympy
I think that's a good idea. I think all we have to have is a
Dockerfile and then setup the docker hub to always automatically
rebuild it when we push to master. And in addition, test the
Dockerfile with each PR on Travis, to make sure it actually builds.

In the dockerfile, we can have a reasonable minimal installation of
jupyter notebook + libraries like matplotlib, scipy, numpy, etc.,
probably via conda. So that it's ready to be used.

On the other hand, I think it's pretty simple to install sympy using
conda, so perhaps it's not needed. Either way is fine with me.

Ondrej

Sartaj Singh

unread,
Jun 27, 2016, 3:09:10 PM6/27/16
to sy...@googlegroups.com
I checked there is also a scipy docker image https://github.com/jupyter/docker-stacks/tree/master/scipy-notebook. Apparently it ships with sympy 0.7. We can update that. The main idea was to ship with the minimum packages, so that the size is not much (docker image are generally big). Amit also wrote in his blog post about FOSSASIA conference, that it took a considerate amount of time to setup. Though, I don't really have an idea as to what is the environment at scipy.


--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CADDwiVBRMOhc-9RBHEbRGNj7nANW76AWmaQ8Jf_HTwFZoTjwrw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Regards
Sartaj Singh

Mathematics and Computing,
Indian Institute of Technology,
Varanasi - 221 005 INDIA

Sartaj Singh

unread,
Jun 27, 2016, 3:22:02 PM6/27/16
to sy...@googlegroups.com
Another resource https://github.com/jupyter/docker-demo-images. The notebooks here are hosted on tmpnb.org. Apparently they serve the notebooks via docker containers. We can have an introductory notebook there as well.

Ondřej Čertík

unread,
Jun 27, 2016, 6:17:40 PM6/27/16
to sympy
On Mon, Jun 27, 2016 at 1:09 PM, Sartaj Singh <singhs...@gmail.com> wrote:
> I checked there is also a scipy docker image
> https://github.com/jupyter/docker-stacks/tree/master/scipy-notebook.
> Apparently it ships with sympy 0.7. We can update that. The main idea was to
> ship with the minimum packages, so that the size is not much (docker image
> are generally big). Amit also wrote in his blog post about FOSSASIA
> conference, that it took a considerate amount of time to setup. Though, I
> don't really have an idea as to what is the environment at scipy.

We can then also easily include SymEngine as well. That would be
useful, since we are slowly starting to use it in SymPy (currently
only in sympy.mechanics). SymPy itself is easy to install, but
SymEngine has to be compiled etc., so that might be useful.

Ondrej

Amit Saha

unread,
Jun 27, 2016, 8:08:07 PM6/27/16
to sy...@googlegroups.com
On Tue, Jun 28, 2016 at 5:21 AM, Sartaj Singh <singhs...@gmail.com> wrote:
> Another resource https://github.com/jupyter/docker-demo-images. The
> notebooks here are hosted on tmpnb.org. Apparently they serve the notebooks
> via docker containers. We can have an introductory notebook there as well.
>
> On 28 June 2016 at 00:39, Sartaj Singh <singhs...@gmail.com> wrote:
>>
>> I checked there is also a scipy docker image
>> https://github.com/jupyter/docker-stacks/tree/master/scipy-notebook.
>> Apparently it ships with sympy 0.7. We can update that. The main idea was to
>> ship with the minimum packages, so that the size is not much (docker image
>> are generally big). Amit also wrote in his blog post about FOSSASIA
>> conference, that it took a considerate amount of time to setup. Though, I
>> don't really have an idea as to what is the environment at scipy.

Just my own thoughts:

It makes sense for having docker-ized versions of Notebook server.
But, just for SymPy may not be so. It is a pure Python package.

How will folks use it? You are really expecting people to download docker,
fetch the image, then run a shell for trying out SymPy? You can get done with
downloading Anaconda/conda in a far less obtrusive fashion and
irrespective of the
OS.
> https://groups.google.com/d/msgid/sympy/CAC%2BH8-F7-pWz19N54Y7rXe0yqWNJrQDY8OHekqnMkTzVEDPj5w%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
http://echorand.me

Sartaj Singh

unread,
Jun 28, 2016, 1:30:58 AM6/28/16
to sy...@googlegroups.com
On 28 June 2016 at 05:37, Amit Saha <amits...@gmail.com> wrote:
On Tue, Jun 28, 2016 at 5:21 AM, Sartaj Singh <singhs...@gmail.com> wrote:
> Another resource https://github.com/jupyter/docker-demo-images. The
> notebooks here are hosted on tmpnb.org. Apparently they serve the notebooks
> via docker containers. We can have an introductory notebook there as well.
>
> On 28 June 2016 at 00:39, Sartaj Singh <singhs...@gmail.com> wrote:
>>
>> I checked there is also a scipy docker image
>> https://github.com/jupyter/docker-stacks/tree/master/scipy-notebook.
>> Apparently it ships with sympy 0.7. We can update that. The main idea was to
>> ship with the minimum packages, so that the size is not much (docker image
>> are generally big). Amit also wrote in his blog post about FOSSASIA
>> conference, that it took a considerate amount of time to setup. Though, I
>> don't really have an idea as to what is the environment at scipy.

Just my own thoughts:

It makes sense for having docker-ized versions of Notebook server.
But, just for SymPy may not be so. It is a pure Python package.

How will folks use it? You are really expecting people to download docker,
fetch the image, then run a shell for trying out SymPy? You can get done with
downloading Anaconda/conda in a far less obtrusive fashion and
irrespective of the
OS.

Agreed. Maybe it will be useful for symengine as Ondrej suggested.
 

For more options, visit https://groups.google.com/d/optout.

Sudhanshu Mishra

unread,
Jun 28, 2016, 4:15:18 AM6/28/16
to sy...@googlegroups.com
Docker containers are used(generally) for services which interact through a port. Having a SymPy docker will not be much useful because you can't expect people to have docker installed(and how to use it) on their system. 

Sudhanshu Mishra

Amit Saha

unread,
Jun 28, 2016, 5:50:31 AM6/28/16
to sy...@googlegroups.com
On Tue, Jun 28, 2016 at 6:14 PM, Sudhanshu Mishra <mrs...@gmail.com> wrote:
> Docker containers are used(generally) for services which interact through a
> port. Having a SymPy docker will not be much useful because you can't expect
> people to have docker installed(and how to use it) on their system.

I think what would be nice would to be be able to run SymPy Live on
one's own and a Docker image would be perfect for that.
> https://groups.google.com/d/msgid/sympy/CAFW_KCRLvteE2NL_by6Vqe-yfDh7nwdLak%2BGV_z8MgyR9V3C4w%40mail.gmail.com.

Aaron Meurer

unread,
Jun 28, 2016, 12:47:03 PM6/28/16
to sy...@googlegroups.com
Migrating SymPy Live to something similar to the try Jupyter
infrastructure would be a great project. The AppEngine has a lot of
issues that would be solved by using a Docker container. In
particular, it is stateless (each execution starts Python fresh and
runs for at most 60 seconds), meaning we have to fake sessions using
pickling. It is also impossible to install any extension modules,
other than the ones that come with it (which is basically just numpy).
So matplotlib is not possible, for instance.

I'd actually like to discuss this with the Jupyter guys at SciPy. I
also think that other projects from SymPy could benefit from having a
Live Sphinx extension.

Sorry for derailing the discussion. I actually think that a Docker
container for SymPy or even SymEngine isn't useful for end-users. They
only work on Linux or a Linux VM, and require a installing and running
Docker to use. It's even worse if the end-user wants to extend them,
say by installing other packages. Docker is much better fitted for
running things in the cloud. For end-users, it's better to support
them by building conda packages (these conda packages could then be
used when building any Docker images).

Aaron Meurer
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CANODV3mRGCsf5WyCS3LSB7WC9pm2Cam4LOj_8ZH_5f2b23buDQ%40mail.gmail.com.

Nathan Goldbaum

unread,
Jun 28, 2016, 12:50:56 PM6/28/16
to sy...@googlegroups.com
On Tue, Jun 28, 2016 at 11:46 AM, Aaron Meurer <asme...@gmail.com> wrote:
Migrating SymPy Live to something similar to the try Jupyter
infrastructure would be a great project. The AppEngine has a lot of
issues that would be solved by using a Docker container. In
particular, it is stateless (each execution starts Python fresh and
runs for at most 60 seconds), meaning we have to fake sessions using
pickling. It is also impossible to install any extension modules,
other than the ones that come with it (which is basically just numpy).
So matplotlib is not possible, for instance.

I'd actually like to discuss this with the Jupyter guys at SciPy. I
also think that other projects from SymPy could benefit from having a
Live Sphinx extension.

Oh, that sounds really cool! I would give serious thought to using this in the documentation for several projects I contribute to if it existed.
 

Ondřej Čertík

unread,
Jun 28, 2016, 4:10:13 PM6/28/16
to sympy
On Tue, Jun 28, 2016 at 10:46 AM, Aaron Meurer <asme...@gmail.com> wrote:
> Migrating SymPy Live to something similar to the try Jupyter
> infrastructure would be a great project. The AppEngine has a lot of
> issues that would be solved by using a Docker container. In
> particular, it is stateless (each execution starts Python fresh and
> runs for at most 60 seconds), meaning we have to fake sessions using
> pickling. It is also impossible to install any extension modules,
> other than the ones that come with it (which is basically just numpy).
> So matplotlib is not possible, for instance.
>
> I'd actually like to discuss this with the Jupyter guys at SciPy. I
> also think that other projects from SymPy could benefit from having a
> Live Sphinx extension.
>
> Sorry for derailing the discussion. I actually think that a Docker
> container for SymPy or even SymEngine isn't useful for end-users. They
> only work on Linux or a Linux VM, and require a installing and running

Actually, Docker runs on Mac and Windows as well:

https://blog.docker.com/2016/03/docker-for-mac-windows-beta/

https://docs.docker.com/docker-for-mac/
https://docs.docker.com/docker-for-windows/

It's still in Beta, but it should work very well.

> Docker to use. It's even worse if the end-user wants to extend them,
> say by installing other packages. Docker is much better fitted for
> running things in the cloud. For end-users, it's better to support
> them by building conda packages (these conda packages could then be
> used when building any Docker images).

Yes. Docker is better suited for running things in the cloud. But
users may want that.

Ondrej
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6JvfVzL4po9uVpYmGxhxfJBnunv6A2T7E%3D4A%2B1xQ-Qtig%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages