Learn Python Coding
39.1K subscribers
636 photos
30 videos
24 files
392 links
Learn Python through simple, practical examples and real coding ideas. Clear explanations, useful snippets, and hands-on learning for anyone starting or improving their programming skills.

Admin: @HusseinSheikho || @Hussein_Sheikho
Download Telegram
Advice for Python, UV, and Docker 🐍🐳

Sometimes dependencies are better installed separately from the code — this noticeably speeds up the compilation of Docker images 🚀

The idea is simple: first, we install dependencies, then we add the project 🛠

Why is this necessary:
Docker caches layers and does not rebuild them unnecessarily ⚡️
• if only the code changes — the dependencies are taken from the cache 💾
• if the dependencies change — only the corresponding layer is rebuilt 🔁
• without this, any minor change triggers a full reinstallation 🔄

Example:

RUN --mount=type=cache,target=/root/.cache/uv  --mount=type=bind,source=uv.lock,target=uv.lock  --mount=type=bind,source=pyproject.toml,target=pyproject.toml  uv sync --locked --no-install-project

COPY . /app
RUN --mount=type=cache,target=/root/.cache/uv uv sync --locked


#Python #Docker #DevOps #UV #SoftwareEngineering #TechTips

Join Best TG Channels https://t.me/addlist/0f6vfFbEMdAwODBk

⭐️ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A

🚀 Level up your AI & Data Science skills with HelloEncyclo — a growing all-in-one platform featuring hands-on courses in LLMs, Deep Learning, MLOps, Data Engineering, and more.
13 courses live + 40+ coming soon
🎯 One access, lifetime updates
🔑 Use code: PRESALE-BOOK-WAVE-2GFG
👉 https://helloencyclo.com/?ref=HUSSEINSHEIKHO
4