Leanpub Header

Skip to main content

Zero-Idle GPU

Running inference workloads on Azure Container Apps serverless GPU, with measured cost data

This book is 100% completeLast updated on 2026-08-18

A GPU inference service on Azure that costs nothing while idle. Real billing data from 48 days in production, plus every trap that cost me time getting there.

Minimum price

$9.00

$14.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
WEB
APP
About

About

About the Book

A production record, not a tutorial.

This book documents a GPU inference service running on Azure Container Apps serverless GPU (NVIDIA T4) with min-replicas=0 — where idle time costs nothing. Over 48 days of real operation, GPU charges appeared on only 12. Total cost, including the month spent building it: about $13/month.

It covers the full deployment, and every trap that cost me time getting there: the torch/transformers version conflict, a missing file that passes every startup check and fails only at inference, a startup ordering bug that produces 504s, and — on Windows — an az CLI that crashes mid-build while the build itself keeps running in the cloud.

The example workload is text-to-speech, but almost nothing here is specific to TTS. Image generation, Whisper, a small language model: swap the model, keep the structure.

The tradeoff is a five-minute cold start. This book is honest about when that disqualifies the architecture.

Author

About the Author

Contents

Table of Contents

Introduction

  1. What you get
  2. What this is not
  3. Why zero-idle matters more than GPU price
  4. The tradeoff you’re accepting
  5. Architecture
  6. How to read this

What It Actually Costs

  1. Monthly totals
  2. The daily distribution
  3. The outlier day
  4. Verifying whether you’re being billed
  5. The line item nobody warns you about
  6. Summary

Prerequisites and Layout

  1. What you need
  2. Region and profile availability
  3. Variables
  4. A note on model licensing
  5. Deployment layout
  6. Cost implications of these choices

Pinning Dependencies

  1. The core conflict
  2. The full pin set
  3. Bundle base models at build time
  4. The trap that only fires at inference time
  5. Debugging strategy when things break
  6. Summary

Cold Start: Startup Order and the 504

  1. What happens on a cold start
  2. The startup ordering that matters
  3. Handling requests during warm-up
  4. Startup probe configuration
  5. Reducing cold start
  6. Setting expectations
  7. Summary

Building in Azure (and Two Windows Traps)

  1. Trap 1: the CLI crashes on character encoding
  2. Trap 2: the build survives your client
  3. A workflow that survives all of this
  4. Tagging
  5. Summary

Creating the GPU App

  1. Environment and workload profile
  2. Creating the app
  3. Confirming it exists
  4. First real request
  5. If it doesn’t come up
  6. Summary

Locking It Down

  1. Layer 1: source IP restriction
  2. Layer 2: OAuth via built-in authentication
  3. Layer 3: email domain check in the app
  4. Why three layers
  5. Verifying
  6. Summary

Update Deploys and Day-2 Operations

  1. The update procedure
  2. Rollback
  3. Registry cleanup
  4. Monitoring cost
  5. Routine health checks
  6. Summary

Every Trap in This Book

  1. Build and dependencies
  2. The silent one
  3. Cold start
  4. Cost
  5. Access control
  6. Platform
  7. Closing

Sample: What This Book Covers

  1. The problem
  2. What it actually costs
  3. What the full book covers

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub