R
RunPod•7mo ago
Monster

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:
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.
Jump to solution
22 Replies
Solution
digigoblin
digigoblin•7mo ago
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.
digigoblin
digigoblin•7mo ago
I run my applications on AWS and send my GPU tasks to RunPod serverless.
justin
justin•7mo ago
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.
Monster
MonsterOP•7mo ago
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.
digigoblin
digigoblin•7mo ago
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
Monster
MonsterOP•7mo ago
Ok I will check this one in detail. thank you so much for your great support. 💯
justin
justin•7mo ago
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.
justin
justin•7mo ago
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
digigoblin
digigoblin•7mo ago
How is it better? I use the one above and it works perfectly
justin
justin•7mo ago
Hmm, just my guess, i think blib-la does the documentation better
digigoblin
digigoblin•7mo ago
Documentation is fine, it works fine for me like I said
justin
justin•7mo ago
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
Monster
MonsterOP•7mo ago
yes, I will try to get rid of comfyUI, peel the diffusion code only. I will try both
justin
justin•7mo ago
Yeah from there, it's basically just calling the runpod serverless endpoint with an http request
digigoblin
digigoblin•7mo ago
The only difference I see in the blib one is it supports S3
justin
justin•7mo ago
yea ur prob right actually, ashelyk's is prob good both is solid then haha
Monster
MonsterOP•7mo ago
yes, but I do not have railway experience, I will try railway anyway, thank you for the advice
justin
justin•7mo ago
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
Monster
MonsterOP•7mo ago
me too. you are right.
justin
justin•7mo ago
Railway
Deploy Django, Celery, Redis & Postgres on Railway
Full Django/Postgres stack with Celery tasks and Redis as cache/queue.
justin
justin•7mo ago
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
Monster
MonsterOP•7mo ago
looks sexy definitely sounds like a time and dollar saver thank you @justin [Not Staff]
Want results from more Discord servers?
Add your server