Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NuGet package creation #919

Closed
zoq opened this issue Mar 6, 2017 · 22 comments
Closed

NuGet package creation #919

zoq opened this issue Mar 6, 2017 · 22 comments

Comments

@zoq
Copy link
Member

zoq commented Mar 6, 2017

mlpack is currently packaged in Fedora, RHEL, Debian, Ubuntu and MacOS (homebrew). But there is no package for windows, one approach is to provide a NuGet package, other approachs are also feasible.

The main goal is to figure out what is necessary to create the NuGet package and maybe there is an easy way to automate and integrate the process into the existing windows setup (AppVeyor). Also since mlpack depends on armadillo and there is no armadillo package in NuGet it might be necessary to provide an armadillo NuGet package first so that it can be defined as a dependency.

References:

Note 1: It's probably a good idea to provide the necessary files via the Jenkins config repo instead of the mlpack repo.

Note 2: Please only consider this issue if you are able to build mlpack on windows, also the issue might be interesting for everyone who likes to work on the "Build testing with Docker and VMs" project idea.

@sinjan25
Copy link

sinjan25 commented Mar 7, 2017

@zoq I would like to work on this. I have been working on policy gradients and almost done with it. But I didn't find any issue to work on which no one else is already working. So I am glad that you have opened a new issue.

@zoq
Copy link
Member Author

zoq commented Mar 7, 2017

Hello @sinjan25 feel free to take a look at the issue.

@NaxAlpha
Copy link
Contributor

Hi, It is up. At the moment it is not fully integrated but manually built but I will soon integrate it in mlpack build process.
https://www.nuget.org/packages/mlpack-windows/

@zoq
Copy link
Member Author

zoq commented Mar 29, 2017

Looks good, I'm not sure I get the purpose of mlpack-windows.redist, is this package necessary?

@NaxAlpha
Copy link
Contributor

Ok got it. Now it is done!

@zoq
Copy link
Member Author

zoq commented Mar 30, 2017

Nice, do you plan to document the instructions somewhere? Also, I was thinking could we use mlpack as package name instead of mlpack windows?

@NaxAlpha
Copy link
Contributor

I would like to write an article or a tutorial in mlpack official website. Since I was experimenting so, I didn't want to use exact identifier because in Nuget one can't delete package or re-upload same version. In my next PR, I will integrate it in AppVeyor Build.

@zoq
Copy link
Member Author

zoq commented Mar 30, 2017

So, in your PR you are going to rename the package? Not sure if that is of interest to create an extra package for the lib and another one for the executables like we have for ubuntu.

Regarding the tutorial maybe the blog is a good place for that, we planed to use it more often, and that could be an opportunity.

@NaxAlpha
Copy link
Contributor

NaxAlpha commented Mar 31, 2017

It is possible to create package for executable using Nuget but it is not a good idea. So I would simple rename package. Also we can provide mlpack chocolaty package for executables.
Blog post looks fine to me!

@zoq
Copy link
Member Author

zoq commented Mar 31, 2017

Can you elaborate on why shipping the command line executables via NuGet is not a good idea? I haven't really thought about it, so I'm just curious to hear your opinion on that.

@NaxAlpha
Copy link
Contributor

NaxAlpha commented Apr 1, 2017

As far as, I know NuGet is more specifically for packages which are installed locally just like npm. To provide better command-line experience (in windows), it would be better to install globally.

@rcurtin
Copy link
Member

rcurtin commented Apr 5, 2017

I don't see why this makes a huge difference for executables; even if the executable is still only installed locally, that's ok, because the user can still run it---it should still be in their $PATH (or whatever the equivalent is on Windows).

@NaxAlpha
Copy link
Contributor

NaxAlpha commented Apr 6, 2017

Ok, That is also good option I guess. I will experiment with it and make it ready ASAP.

@rcurtin
Copy link
Member

rcurtin commented Apr 7, 2017

Just to clarify on the discussion we had in IRC today, I have learned several things:

  • NuGet appears to be used specifically by developers who are including dependencies in their Visual Studio project, and it installs these dependencies specifically to the directory where the project is being built. So from that angle I can agree that it does not make sense to include the command-line executables in the NuGet package. (Either I remembered what NuGet was incorrectly, or I never fully knew; not sure.)

  • Chocolatey appears to be a package manager for the entire system, much more like apt or dnf. It appears to be able to make a package out of a given MSI. Therefore, this appears that it will be the more preferable option for users who want to use the mlpack command-line programs.

So it seems to me that a library-only install is the right thing for NuGet (this can be configured with CMake options), and then an MSI installer can be used to create a Chocolatey package. We can also distribute the MSI installer on its own.

@zoq: any thoughts? It's possible I am still misunderstanding here; I know the Windows environment has changed significantly since the last time I used it full-time (2005).

@zoq
Copy link
Member Author

zoq commented Apr 8, 2017

Sounds good, great to have a windows user who is able to provide some valuable insight.

@Kavignon
Copy link

What is the current state to having mlpack as a NuGet package ?
More to this, when the automatic bindings to C# is over, do we still feel the need to have a NuGet package?

@zoq
Copy link
Member Author

zoq commented Mar 25, 2018

There is a NuGet package, but it's not integrated into the current build process. I see the NuGet package as a simple way to build against mlpack, it's definitely not the only solution but if someone is already familiar with NuGet, I can't see a reason for not providing a package.

@mlpack-bot
Copy link

mlpack-bot bot commented Feb 18, 2019

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! 👍

@mlpack-bot mlpack-bot bot added the s: stale label Feb 18, 2019
@rcurtin rcurtin removed the s: stale label Feb 18, 2019
@gmanlan
Copy link
Contributor

gmanlan commented Jul 17, 2019

Hi, the mlpack-windows NuGet package is quite old (mlpack v2.2, 2017). Also, the package is pulling old versions of the dependencies (Boost 1.60, armadillo 7.800...). It would be nice if we can update it and in the process add the automatic scripts to build and publish from AppVeyor. The beauty about NuGet is that you can publish several versions and users can select the one they want to add into their project.

@NaxAlpha and @rcurtin are right, CLI executables should not be included in the NuGet package. The package should only contain DLLs to be used by the VS project the user is developing. You can check the OpenBLAS NuGet package for a great example of this.
Finally, NuGet packages are often the way to go with continuous integration systems building VS projects. That means, if a build system needs to pull a very heavy package each time the build runs (imagine containing all the executables), it would not be a great experience, and also it's not what the developer needs in this context.

@rcurtin
Copy link
Member

rcurtin commented Jul 10, 2020

@NaxAlpha I know it has been a long time since this issue has been discussed, but is there any chance you would be willing to look into updating the mlpack NuGet package? Like @gmanlan pointed out the one that's there is quite old. 👍

@shrit
Copy link
Member

shrit commented Oct 23, 2021

@rcurtin if you would like I am happy to handle this one in addition to the ensmallen package.

@rcurtin
Copy link
Member

rcurtin commented Oct 24, 2021

Sure, if you like---I guess I had forgotten about this one. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants