Get help from the marimo community

Updated 7 months ago

Setting options when running programatically

At a glance

The community member is trying to set a configuration for the Marimo framework when running it programmatically as part of a FastAPI app inside a Docker container. They have tried placing the .marimo.toml file in various directories, but the configuration is not being picked up. The community member suspects this may be related to an issue they are experiencing where the page does not load correctly on Chromium browsers, while it works fine on Firefox. They have noticed some <link /> errors in the Chromium console and believe this may be related to the symlink issue they are trying to resolve by setting follow_symlink = true.

Other community members have provided suggestions, such as checking for any 404 errors in the network tools and inspecting the HTML returned to see if anything is being stripped. They have also offered to take a look at the Dockerfile to see if they can identify the issue. The community members are working together to try and resolve the problem.

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!
M
f
13 comments
Are you deploying this or running it elsewhere? Can you write the marimo toml file wherever you are running this?
It's running as part of a FastAPI app inside a docker container.

Plain Text
app.mount("/dashboard", marimo_dev_server.build())


and

Plain Text
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.
that should be fine. are you sure the error is that it is not picking up the configuration?
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.
Attachment
image.png
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:
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?
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 πŸ‘
Add a reply
Sign up and join the conversation on Discord