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

[help] Package for NixOS linux distribution #50

Closed
malteneuss opened this issue May 18, 2024 · 4 comments
Closed

[help] Package for NixOS linux distribution #50

malteneuss opened this issue May 18, 2024 · 4 comments

Comments

@malteneuss
Copy link
Contributor

Hi and thanks for this awesome package.
i'm currently looking for a simpler home-lab ollama ui to package for the Nix package manager and its Linux distribution (the alternative https://github.com/open-webui/open-webui has become way too bloated and complicated for many self-host users).
The idea is that users, that have the Nix package manager installed (e.g. on Ubuntu), will be able run your app with a single call

nix run nixpkgs#ollama-llm-ui

without having to manually install anything else.

I'm currently stuck with the following failure on npm build, which runs next build:

Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry

   ▲ Next.js 14.1.0

   Creating an optimized production build ...
request to https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap failed, reason: getaddrinfo EAI_AGAIN fonts.googleapis.com
...
FetchError: request to https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap failed, reason: getaddrinfo EAI_AGAIN fonts.googleapis.com

To build a Nix package, it has to happen in an isolated environment like Docker without internet access.

Do you know how to prevent nextjs from trying to download the googleapis.com fonts and disable this telemetry? Would it be possible to use another offline font instead? Maybe like https://stackoverflow.com/a/75476382/4936725 ?

Best regards

@jakobhoeg
Copy link
Owner

Hey, @malteneuss

Sorry for the late reply.
Thank you for the feedback - did you figure it out? Or is there anything I can do to ease the process?

@malteneuss
Copy link
Contributor Author

@jakobhoeg No worries. Yes, i was able to patch the google font download away and replace it with a local copy. I also had to update the Nextjs version (don't know why) and enable the the "standalone" output in next.config.js to let Nextjs create a self-contained, deployable artefact that doesn't need Nextjs anymore. See NixOS/nixpkgs#313146

If you're open for it, i'll upstream the Nextjs update and the standalone ouput config here with some PRs.

@malteneuss
Copy link
Contributor Author

malteneuss commented May 25, 2024

The package was accepted and merged into NixOS: NixOS/nixpkgs#313146
If you install the "multi-user" Nix package manager on your Linux distribution, you should be able to run the app with the following commandline:

nix run nixpkgs/master#nextjs-ollama-llm-ui

@jakobhoeg
Copy link
Owner

The package was accepted and merged into NixOS: NixOS/nixpkgs#313146

If you install the "multi-user" Nix package manager on your Linux distribution, you should be able to run the app with the following commandline:


nix run nixpkgs/master#nextjs-ollama-llm-ui

Awesome! Thank you very much for the help 🙏

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

No branches or pull requests

2 participants