docker-stacks icon indicating copy to clipboard operation
docker-stacks copied to clipboard

Try pypy-based image

Open mathbunnyru opened this issue 3 years ago • 7 comments

Now, using miniforge, we may be able to try PYPY based images quite easily. I'm not sure it would work and that it would be that easy, but it might give significant performance improvement and it that case it would be nice to have a choice.

For example, scipy-notebook-python and scipy-notebook-pypy would be fine for me.

mathbunnyru avatar Nov 29 '20 22:11 mathbunnyru

Having kicked the tires on a number of different configurations: stuff like json parsing/validating gets the advertised 4x benefit, so tornado and the notebook server run faster, and things feel snappier...

In-kernel, for scientific computing, it's kind of a mixed bag... One you get to numpy-derived things, the benefits are somewhat harder to maintain. Also, as packages get more exotic, they just won't be available, as conda packages/pypy wheels get harder to come by, if the upstream even cares about supporting pypy. I haven't investigated whether, say, numba could be used to keep that boundary better defined.

So yes, as an experiment, a pypy PR would be pretty interesting, especially if benchmarked some common workloads, but it will likely have to carry some disclaimers. If nothing else, it would point out which packages are missing from the on-going pypy migration on conda-forge.

bollwyvl avatar Nov 30 '20 12:11 bollwyvl

cc @mattip (who may be interested in this 😉)

jakirkham avatar Nov 30 '20 22:11 jakirkham

Nice, thanks for piniging me. Do you get much feedback from end users what works for them and what doesn't?

mattip avatar Dec 01 '20 05:12 mattip

PyPy migration on conda-forge works fine. For building a pypy based scipy-notebook you have to change two lines in the base-notebook Dockerfile: ARG miniforge_python="Mambaforge-pypy3" and the ARG miniforge_checksum= No futher modifications are needed.

lima4658 avatar May 30 '21 17:05 lima4658

Thanks, @lima4658. Did you try to build all the images or only scipy-notebook (and its parents)?

The thing is, that it would be nice to receive some feedback from users, that they really want these images (as you see, this thread is not really active).

And, to support these images, we will need something closely related to https://github.com/jupyter/docker-stacks/issues/1019. I think it might be super-easy to implement pypy images after implementing multi-arch images, because customization points actually look more-or-less the same.

mathbunnyru avatar May 31 '21 12:05 mathbunnyru

@mathbunnyru I build only base-notebook, minimal-notebook and scipy-notebook. As mentioned only minimal modifications in the base-notebook Dockerfile were needed. Maybe in the next days I have time to build the missing notebooks.

Is a "conda free" version based on ubuntu python packages requested? If yes let me know. I can provide versions until scipy-notebook.

lima4658 avatar May 31 '21 20:05 lima4658

@mathbunnyru I build only base-notebook, minimal-notebook and scipy-notebook. As mentioned only minimal modifications in the base-notebook Dockerfile were needed. Maybe in the next days I have time to build the missing notebooks.

Is a "conda free" version based on ubuntu python packages requested? If yes let me know. I can provide versions until scipy-notebook.

No, we use conda (or sometimes mamba) wherever possible, so, on the contrary, it would be nice to have all packages installed through conda (or mamba, which uses the same channels and packages).

mathbunnyru avatar May 31 '21 20:05 mathbunnyru

I didn't see much interest in pypy images, so closing this one. Please, if someone want to make it, ping me, I can describe how to change build system to make it work.

mathbunnyru avatar Sep 30 '22 09:09 mathbunnyru