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

Precompiled finalfusion utilities #27

Open
danieldk opened this issue Sep 17, 2019 · 4 comments
Open

Precompiled finalfusion utilities #27

danieldk opened this issue Sep 17, 2019 · 4 comments
Assignees
Labels
feature New feature or request

Comments

@danieldk
Copy link
Member

Continuing the discussion in #26. I think I have found a nice solution to this: with Nix I can build a single binary with all the dependencies. It is not a static binary, but the binary will actually contain a tarball of the transitive closure of dependencies. It's self-extracting and uses user namespaces to pivot root (since the libraries are not relocatable).

I think it has nice properties, such as that we have complete control over the dependencies, down to the C library. But it requires that we have a single binary rather than several binaries as we have now.

So, I fear I have to use subcommands, which you know I am not a fan of ;). I'll implement a single finalfusion command with subcommands and see if I can live with it.

@danieldk danieldk added the feature New feature or request label Sep 17, 2019
@danieldk
Copy link
Member Author

Ok, now with subcommands I produced a single binary that contains OpenBLAS and other dependencies including libfortran :):

% du -m finalfusion 
22	finalfusion

Dependency closure:

% nix-store -qR $(nix-build --no-out-link '<nixpkgs>' -A nlp.finalfusion-utils)
/nix/store/6yaj6n8l925xxfbcd65gzqx3dz7idrnn-glibc-2.27
/nix/store/qrhma6myi9gak3qfm17bpckdzk4xzi45-gfortran-7.4.0-lib
/nix/store/zpdsv2vifql4k4qa2w8j2zzvrhczn6p8-openblas-0.3.7
/nix/store/77z6i47qk1d3a7dyv2cb08jvaxkyq803-finalfusion-utils-0.8.0

@danieldk
Copy link
Member Author

@danieldk
Copy link
Member Author

I tried to build a standalone binary with MUSL, but this gives all kinds of funky issues. I think I have all environment variables set correctly, but OpenBLAS looks for the linux/unistd.h header, which is not in musl-dev on Ubuntu.

@sebpuetz
Copy link
Member

Binary for testing:

https://github.com/finalfusion/finalfusion-utils/releases/download/0.9.0/finalfusion-x86_64-linux-0.9.0-test.

Seems to work for me under Ubuntu 18.04, although I haven't tried the fancy stuff like quantizing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Development

No branches or pull requests

2 participants