Serverless LLMs and Agentic AI with Modal โ€“ Lesson 3

BrainOmega ยท Intermediate ยท๐Ÿค– AI Agents & Automation ยท4mo ago
๐Ÿ’– Support BrainOmega โ˜• Buy Me a Coffee: https://buymeacoffee.com/brainomega ๐Ÿ’ณ Stripe: https://buy.stripe.com/aFa00i6XF7jSbfS9T218c00 ๐Ÿ’ฐ PayPal: https://paypal.me/farhadrh ๐ŸŽฅ In this video, we continue our Serverless LLMs and Agentic AI course with Lesson 3: Custom Images in Modal. After learning how to run functions remotely and control scaling in the previous lessons, we now focus on a critical question: what environment does your code actually run in? In this lesson, youโ€™ll learn how Modal images define the container environment for your serverless AI workloads, without writing Dockerfiles or managing infrastructure. This lesson is fully hands-on and environment-focused. Youโ€™ll learn how to build custom Modal images by installing system packages, Python dependencies, and running shell commands during image build time. Youโ€™ll also see how to ship local assetsโ€”such as templates, configuration files, and promptsโ€”directly into the container. To make everything concrete, we build a small Report Generator Service that downloads a public-domain book during image build, processes it at runtime, and returns both Markdown and HTML reports using a Jinja2 template. By the end of this lesson, youโ€™ll understand how image layers work, why build-time steps matter, and how to design fast, reproducible, and production-ready environments for LLM inference, embeddings, and agentic systems. This lesson gives you the mental model needed to move beyond toy examples and start building real serverless AI applications. ๐Ÿ’ป Code on GitHub: https://github.com/frezazadeh/serverless-llm-agentic-ai/blob/main/Lesson3.ipynb โธป ๐Ÿ“š What Youโ€™ll Learn โ€ข What Modal images are and how they define container environments โ€ข How to install system packages with apt_install โ€ข How to install Python dependencies with pip_install โ€ข How to run shell commands during image build time โ€ข How to ship local assets using add_local_dir and add_local_file โ€ข Why image layer ordering affects rebuild speed โ€ข How
Watch on YouTube โ†— (saves to browser)
Sign in to unlock AI tutor explanation ยท โšก30

Related AI Lessons

โšก
Recepcionista virtual vs contestadora automรกtica en Argentina: flujo de intake para llamadas, WhatsApp y derivaciรณn
Learn how a virtual receptionist AI can improve intake flow for calls, WhatsApp, and referrals in Argentina, and why it's better than an automated answering machine
Dev.to AI
โšก
Quรฉ es una recepcionista virtual IA en Argentina: flujo de intake para llamadas, WhatsApp y derivaciรณn
Learn how a virtual AI receptionist works in Argentina, handling calls, WhatsApp, and redirection as a designed intake flow, not just a free bot
Dev.to AI
โšก
Mejor recepcionista virtual para PyMEs en Argentina: flujo de intake para llamadas, WhatsApp y derivaciรณn
Learn how to design a virtual receptionist AI for small and medium-sized enterprises (PyMEs) in Argentina using a flow-based intake system
Dev.to AI
โšก
AI Answering Service Ireland: 24/7 Call Handling for SMEs: an intake workflow for missed calls
Implement a 24/7 AI answering service to streamline call handling for SMEs in Ireland, improving customer experience and reducing missed calls
Dev.to AI
Up next
New Kimi Web Bridge Browser AI Agent is INSANE!
Julian Goldie SEO
Watch โ†’