btnaughton
Mmarimo
•Created by btnaughton on 1/8/2025 in #help-support
Serving multiple marimo apps on the same fastapi app
I am trying to serve marimo apps on a company server (python, not webassembly).
I have fastapi working fine, but I am running up against a problem with imports.
Originally I thought the sandbox imports would work, but it looks like this is not the case (I found a message on this discord).
That leaves a few options to solve the import problem:
- use mo.install() to somehow pull in the sandbox imports? But if all the apps are in the same marimo process does this create conflicting imports? Also how would I read in the imports?
- use
marimo run --sandbox
and have each app have its own process and port that i have to forward to
- use a global uv environment for all apps and keep it synced across apps somehow. This will eventually lead to conflicts.
Obviously my preference would be something where i can just have one marimo fastapi app,
but I am not sure what the best way to achieve this is, while keeping apps sandboxed.
Generally each app will have many imports.
Thanks for any advice!7 replies
Mmarimo
•Created by btnaughton on 8/28/2024 in #help-support
running marimo on modal
I actually posted this to github discussions, so apologies for double-positng. I think this is probably a better forum for this question... (Happy to delete the github one if that's helpful)
I am trying to get marimo running on modal, following https://docs.marimo.io/guides/deploying/programmatically.html and https://docs.marimo.io/guides/deploying/authentication.html
The following code works, up to the point of giving a 401 for /api/kernel/instantiate
I have tried adding middleware and I can see the requests come through.
I can reject requests (return 401) but I can't figure out how to prevent a 401 for /api/kernel/instantiate
I think I am missing something fundamental about what's going on here, since I don't see where a token could be validated, or where the 401 is actually happening. I do see
marimo-server-token
in the header for /api/kernel/instantiate but no authorization
or similar.
If anyone has any ideas, I would appreciate it! Running marimo on modal would be fantastic.27 replies