0Pricing
MLOps Academy · درس

النشر على بيئة تشغيل حاويات بلا خوادم

شغّل النموذج على Cloud Run أو App Runner.

النشر على بيئة تشغيل حاويات بلا خوادم درس مجاني في MLOps Academy على CoddyKit. هذا هو الدرس 2 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في MLOps Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة MLOps Academy 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

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. 🎉

الأسئلة الشائعة

هل درس «النشر على بيئة تشغيل حاويات بلا خوادم» مجاني؟

نعم — نص درس «النشر على بيئة تشغيل حاويات بلا خوادم» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة MLOps Academy، انتقل إلى CoddyKit PRO. تتضمن دورة MLOps Academy 4 دروس في المجموع.

ماذا ستتعلم في «النشر على بيئة تشغيل حاويات بلا خوادم»؟

شغّل النموذج على Cloud Run أو App Runner. تتمرن على MLOps Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ MLOps Academy؟

لا تُشترط خبرة سابقة. MLOps Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 2 من أصل 4.

كم من الوقت يستغرق درس «النشر على بيئة تشغيل حاويات بلا خوادم»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس MLOps Academy هذا؟

نعم. كل درس في MLOps Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. دفع الصورة إلى سجل
  2. النشر على بيئة تشغيل حاويات بلا خوادم
  3. تهيئة التوسع التلقائي والتزامن
  4. إدارة الأسرار والإعدادات في السحابة
← العودة إلى MLOps Academy