0Pricing
MLOps Academy · Lektion

In einer serverlosen Container-Laufzeitumgebung bereitstellen

Führen Sie das Modell auf Cloud Run oder App Runner aus.

In einer serverlosen Container-Laufzeitumgebung bereitstellen ist eine kostenlose MLOps Academy-Lektion auf CoddyKit. Dies ist Lektion 2 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des MLOps Academy-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der MLOps Academy-Kurs umfasst insgesamt 4 Lektionen.

Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.

Skip the Servers

A serverless container runtime runs your image without you managing any VMs. You hand over a container, and the platform handles the rest. ☁️

Two Popular Choices

Google offers Cloud Run and AWS offers App Runner. Both pull your image from a registry and expose it behind a managed HTTPS URL.

Deploy from an Image

You point the runtime at your pushed image and it creates a service. With Cloud Run, one deploy command turns an image into a live URL.

gcloud run deploy model-api --image registry.example.com/team/model-api:1.0.0

Listen on the Right Port

The platform sends traffic to a port it chooses, exposed as the PORT environment variable. Your app must bind to that value, not a hardcoded one.

uvicorn main:app --host 0.0.0.0 --port ${PORT}

Bind to All Interfaces

Inside a container, bind the server to 0.0.0.0, not 127.0.0.1. Otherwise the platform cannot route outside traffic into your process.

Stateless Containers Only

Instances start and stop at any time, so anything saved to local disk can vanish. Keep the service stateless and store data externally.

You Pay for What You Serve

Serverless billing is usually per request and per active second. When no one calls your model, idle time can cost almost nothing. 💸

Mind the Cold Start

If an idle service scaled to zero, the next request waits for a container to boot. That delay is a cold start, common with big model files.

Keep a Warm Instance

To dodge cold starts, set a minimum instances floor. The platform keeps that many containers warm and ready to answer instantly.

gcloud run deploy model-api --min-instances 1

Watch the Live Logs

The runtime streams your container output to its logs console. Tail them right after a deploy to confirm the model loaded cleanly.

From Image to Live URL

That is the whole loop: push an image, run one deploy, and the platform returns a public URL serving your model over HTTPS.

Quick Check

Let us check why your first request can feel slow.

Recap

You deployed an image to a serverless runtime, bound to PORT on 0.0.0.0, stayed stateless, and tamed cold starts. Your model is live. 🎉

Häufig gestellte Fragen

Ist die Lektion „In einer serverlosen Container-Laufzeitumgebung bereitstellen“ kostenlos?

Ja — der vollständige Text von „In einer serverlosen Container-Laufzeitumgebung bereitstellen“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des MLOps Academy-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der MLOps Academy-Kurs umfasst insgesamt 4 Lektionen.

Was lerne ich in „In einer serverlosen Container-Laufzeitumgebung bereitstellen“?

Führen Sie das Modell auf Cloud Run oder App Runner aus. Du übst MLOps Academy mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.

Brauche ich Erfahrung, um MLOps Academy zu starten?

Keine Vorkenntnisse erforderlich. MLOps Academy auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 2 von 4.

Wie lange dauert die Lektion „In einer serverlosen Container-Laufzeitumgebung bereitstellen“?

Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.

Kann ich in dieser MLOps Academy-Lektion Code schreiben und ausführen?

Ja. Jede MLOps Academy-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.

Alle Lektionen in diesem Kurs

  1. Ihr Image in eine Registry übertragen
  2. In einer serverlosen Container-Laufzeitumgebung bereitstellen
  3. Autoscaling und Nebenläufigkeit konfigurieren
  4. Secrets und Konfiguration in der Cloud verwalten
← Zurück zu MLOps Academy