can I deploy flask, celery, redis, postgreSQL on runpod?
Hi,
as you know the pod only persist data under /workspace folder. for all python related packages I can use venv to put all the data and configuration under /workspace.
while if I need to install all the tools like flask, celery, redis, postgreSQL they are not python installation, the configuration files will be scattered here and there. all these file and configuration will disappear after pod restart.
So, what is the best practice to do so ? or runpod is not designed to be used in this scenario.
thank you !
Solution:Jump to solution
You can install whatever you want but I don't recommend installing databases etc on RunPod. Its better to deploy those things to a CPU cloud provider and use RunPod serverless for offloading tasks that need to run on a GPU.
22 Replies
Solution
You can install whatever you want but I don't recommend installing databases etc on RunPod. Its better to deploy those things to a CPU cloud provider and use RunPod serverless for offloading tasks that need to run on a GPU.
I run my applications on AWS and send my GPU tasks to RunPod serverless.
Runpod, I would run it as a pure processing unit as digigoblin said. Otherwise, you're paying a really high premium for something that a bunch of other providers are way more optimized to do.
sounds perfect for my case. any chance you have some blog or post explain how to connect dots synthsizing aws and runpod? my case I'd like to use flask and postgreSQL to deploy the api backend. the api shall pass the gpu task to runpod which is the comfyUI workflows.
You can use this for creating a ComfyUI serverless endpoint:
https://github.com/ashleykleynhans/runpod-worker-comfyui
Then your flask API can simply forward requests to the RunPod serverless endpoint.
GitHub
GitHub - ashleykleynhans/runpod-worker-comfyui: RunPod Serverless W...
RunPod Serverless Worker for the ComfyUI Stable Diffusion API - ashleykleynhans/runpod-worker-comfyui
Ok I will check this one in detail. thank you so much for your great support. 💯
GitHub
GitHub - blib-la/runpod-worker-comfy: ComfyUI as a serverless API o...
ComfyUI as a serverless API on RunPod. Contribute to blib-la/runpod-worker-comfy development by creating an account on GitHub.
This one is probably better
This person set it up i think more for a direct thing
But tbh, I think diffuser directly still the best, if u don't need comfy ui. Just pure code makes it easier to work with than worrying about conforming to something else
How is it better? I use the one above and it works perfectly
Hmm, just my guess, i think blib-la does the documentation better
Documentation is fine, it works fine for me like I said
Tbh, if it was me, for your use-case I'd consider Railway
Railway less pain in the ass than AWS
Railway + runpod
+ Railway has default templates i believe for what u want
And then u dont need to fight with aws lamdas / gateways / iam roles
yes, I will try to get rid of comfyUI, peel the diffusion code only.
I will try both
Yeah from there, it's basically just calling the runpod serverless endpoint with an http request
The only difference I see in the blib one is it supports S3
yea ur prob right actually, ashelyk's is prob good
both is solid then haha
yes, but I do not have railway experience, I will try railway anyway, thank you for the advice
YT videos are super easy, and setup with it is within like 10 mins
It really really streamlined
i think tons of startups honestly just do a way better job than AWS
if i can avoid GCP / AWS / Azure i try to lol
me too. you are right.
Railway
Deploy Django, Celery, Redis & Postgres on Railway
Full Django/Postgres stack with Celery tasks and Redis as cache/queue.
Ik it isn't flask, but can imagine similar
lul
but its nice cause they got starters just like that
Also I like u can actually specify a spend limit - i believe - haven't tried myself
vs aws u can just keep running the bill infinitely
looks sexy
definitely sounds like a time and dollar saver
thank you @justin [Not Staff]