flyomotive
flyomotive4mo ago

Setting options when running programatically

Hello, how can I set config when running marimo programmatically? I've tried a bunch of stuff but nothing works. The corresponding .marimo.toml entry would look like this: [server] follow_symlink = true Thanks!
7 Replies
Myles Scolnick
Myles Scolnick4mo ago
Are you deploying this or running it elsewhere? Can you write the marimo toml file wherever you are running this?
flyomotive
flyomotiveOP4mo ago
It's running as part of a FastAPI app inside a docker container.
app.mount("/dashboard", marimo_dev_server.build())
app.mount("/dashboard", marimo_dev_server.build())
and
marimo_dev_server = marimo.create_asgi_app().with_app(path="/", root="notebooks/dev.py")
marimo_dev_server = marimo.create_asgi_app().with_app(path="/", root="notebooks/dev.py")
I tried to put the .marimo.toml inside the root directory of the FastAPI app, and in a few other directories as well, but it never did anything.
Myles Scolnick
Myles Scolnick4mo ago
that should be fine. are you sure the error is that it is not picking up the configuration?
flyomotive
flyomotiveOP4mo ago
I think so. This is what the data-config looks like when loading the app. As you can see, the follow_symlink is false even though the .marimo.toml would set it to true.
No description
flyomotive
flyomotiveOP4mo ago
Actually the underlying issue why I want to enable follow_symlink in the first place is that the page is not loading correctly on Chromium browsers, whereas on Firefox it loads normally. On Chromium, the root div just stays empty, while in Firefox, it gets populated after a while, when the hourglass icon stops spinning. On Chromium, there is not even an hourglass icon. In the Chromium console, there are 8 entries like this: <link rel=preload> has an invalid href value Those don't show up in Firefox. By searching through GitHub repos, I found that this could be related to the symlink thing, which is why I am trying to enable it. If you are up for it, I can give you access to have a look. One more thing: When running the app locally it loads normally on all browser engines; it's only when it's running in a Docker container in our K8s cluster that there are any issues with Chromium. And of course, big thanks for taking a look! :blob_thanks:
Myles Scolnick
Myles Scolnick4mo ago
hi @flyomotive, definitely happy to take a look. quick thoughts: * follow_symlink shouldnt effect the browser. so if it works in Firefox, that likely isn't the issue * i've deployed many marimo docker containers, and havent needed follow_symlink to be true either, so there may be another issue * if you can share the Dockerfile (here or private DM work) I can take a look * <link rel=preload> might be a redherring. if you look at your network tools, do you see any 404s coming from your server? if you look at the HTML returned, is something being stripped from the link tags? does it look the same in firefox?
flyomotive
flyomotiveOP4mo ago
Thanks a lot for that info! I will get you that info in a minute, and I'll try to get you a user so you can log in and see for yourself. @Myles Scolnick I'll message you in a DM 👍