uncomplicate / neanderthal

Fast Clojure Matrix Library
http://neanderthal.uncomplicate.org
Eclipse Public License 1.0
1.06k stars 56 forks source link

Add Dockerfile and basic Docker guide #101

Closed lccambiaghi closed 3 years ago

lccambiaghi commented 3 years ago

As title.

blueberry commented 3 years ago

Hi Lucca,

Thanks for contributing this. Can you please make a few changes:

lccambiaghi commented 3 years ago

Hi @blueberry , I can definitely try to update the dependencies, thank you the versions.

I don't understand what you mean exactly with your first request.. I, as a user, would be really happy to find a Dockerfile in the repo and some instructions on how to build and run..

An alternative I can think of is to put the Dockerfile in another repo, for example here: https://github.com/scicloj/docker-hub and then perhaps have a quick guide in the README? Or how would you prefer it?

blueberry commented 3 years ago

But as a user, you're not even supposed to ever need to touch neanderthal's source repository. Neanderthal has already been built and distributed through Clojars. So, as a user, you should just inlude uncomplicate/neandeathal as a dependency in your leiningen, boot, maven, or deps.edn and that's it.

For your project to work, then, MKL is also needed on the system (or as a dependency via bytedeco's MKL jar), but it's up to the user how to configure that, and is not related to Neanderthal source project itself.

I don't use docker myself, so I'm not the best person to ask how this should be distributed. If you're on Debian-based Linux, for example, then only one line from that dockerfile is relevant: "sudo apt-get install intel-mkl" (or something like that). Most other Linux distros would have MKL in their repo, for example, on Arch, it's sudo pacman -Syu intel-mkl. Now, I understand than some Windows or macOS users might find docker the most familiar path, but in that case, I guess that they can take these two Docker-related files from any place on the Internet that you put it in, and do the docker thing with it that they normally do with their project. The point is that I don't see why this should be a part of Neanderthal project on Github (or how it would help if it was).

lccambiaghi commented 3 years ago

Thank you for your explanation. I politely disagree with you. Here a few thoughts:

  1. Neanderthal is not a simple dependency in your deps.edn but you are required to install a 1GB library and many users don't want to install it system-wide. Docker helps exactly for this case.
  2. It may just be a one line on Debian but it is a pain for macOS users. It is unfortunate that you don't want to help users on this platform by simply adding one file to your repo. You could even put a big disclaimer "If everything goes wrong, as a last resort you can use this Dockerfile".
  3. Many users just want to experiment with this library, maybe play with the great linear algebra tutorials you have written. Once again, Docker is perfect for this.

Anyway, it seems you have taken your decision. I am going to close this PR, hopefully the unlucky macOS users can find this information on their own :)

blueberry commented 3 years ago

Thank you for your explanation. I politely disagree with you. Here a few thoughts:

  1. Neanderthal is not a simple dependency in your deps.edn but you are required to install a 1GB library and many users don't want to install it system-wide. Docker helps exactly for this case.

I don't see how the dockerfile in Neanderthal repo helps with this. What's different than the same dockerfile in another repo?

  1. It may just be a one line on Debian but it is a pain for macOS users. It is unfortunate that you don't want to help users on this platform by simply adding one file to your repo. You could even put a big disclaimer "If everything goes wrong, as a last resort you can use this Dockerfile".

How would I help them by putting the file in the repo, that is different than the disclaimer for the Dockerfile in its own repo?