-
Notifications
You must be signed in to change notification settings - Fork 1k
wip: experiment running the UI from fastapi #2177
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
Conversation
- Add pre-req to run the server (install deps) - Fix the static build Closes: meta-llama#2174 Signed-off-by: Sébastien Han <[email protected]>
Using a static version. Signed-off-by: Sébastien Han <[email protected]>
cc @ehhuang |
This precludes running anything on the server as part of Next.JS. This is the true benefit of Next where pieces of the UI can move transparently between the backend and the frontend. It is extremely beneficial as the UI scales. I need to understand the root cause of the concern: is the concern the need for a Node runtime for the Stack? |
The short answer is yes. My main concern is how we can elegantly include it as part of the server unless we say, " The UI runs standalone as another service next to the distro server." |
I think it is important to understand the overarching primary requirement: The Stack shall come with UI. No ifs and buts. You can of course configure (via YAML) to say "nope, don't want that s**t." But the default is that the Stack comes with UI. Given that requirement, the next goal is: we shall not handicap that UI from the get go. Forcing premature constraints on how a proper modern UI should be architected will get us something half baked which serves nobody's purpose. So yes:
|
Correct that's how it should run in the cluster. |
By the way, while we are iterating on the UI and haven't quite gotten the Node / NPM stuff completely worked out, it is reasonable to say "UI is not yet the default and you must do a cc @ehhuang |
This clears out all of my concerns then. However, that's not what this PR does. It runs it as a subprocess of the distro server :/ |
@ashwinb this is a followup on our previous conversation. By using the script attached in f9095ce, I could run a static version of the file. This eliminates the need to call
npm
to run the UI. We can include the static content in a new route on the distro server.I've run both the static version and the one with
npm dev run
, and I get two identical pages—except the dev tool debug thingy.Am I missing something? If not, I feel we still have a case where we build the static version of the site (from
.next
, we would need to track that directory) and package it along with our current package. Then users can decide to activate the UI or not through a server spec config.Thanks for considering this!