kedro-org / kedro-viz

Visualise your Kedro data and machine-learning pipelines and track your experiments.
https://demo.kedro.org
Apache License 2.0
646 stars 106 forks source link

How to open Kedro viz build folder locally? #1918

Open noklam opened 1 month ago

noklam commented 1 month ago

Description

Is your feature request related to a problem? A clear and concise description of what the problem is: "I'm always frustrated when ..."

I have a request from user which need to share viz with 0 infrastructure. At the end I recommend just using kedro viz build and open the index.html directly. My impression is that I can open the index.html, but it doesn't work as I get a kedro-viz UI but things are not loaded properly. Maybe the it's a routing issue similar to the sub-path?

image

I recalled I can do this with sphinx doc build. At the end I have to use the vscode extension "Live Serverand openindex.html` with it, so it's a mini web server running behind.

Questions:

dcfalcon commented 1 week ago

Same exact issue over here

dcfalcon commented 1 week ago

After a few checks the reason we are not able to visualize it properly is the next one (using the console ) Access to fetch at 'path_project/build/api/main' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.

Maybe it's not the best but if you want a fast fix you can do the next.

Go to the folder build/ and run python -m http.server 8000 creating your own http server and then will work