Loading video...

Video Failed to Load

Go Home

Reduced a Docker image from 1.37GB → 168MB. Just by using multi-stage builds, slim base images, and cleaning unused dependencies. Small optimizations = faster CI/CD and safer containers.

157,277 views • 5 months ago •via X (Twitter)

0 Comments

No comments available

Comments from the original post will appear here

Related Videos

You are using Docker wrong. I promise! Here are the two things you are missing out: • Your Dockerfiles are using a single stage. This is very slow. • You aren't caching steps as much as you could. This is also slow. For a couple of years now, Docker has been using BuildKit as its primary engine, which has added support for multi-stage Dockerfiles. Here's the deal: A single-stage Dockerfile (the one you are likely using) forces every step to depend on the previous one. That means: • Everything runs sequentially • The generated image is huge • Any change will skip cached layers • No opportunities to parallelize steps Changing one line early in the Dockerfile renders everything after it useless. There's a better way: Start using multi-stage builds. I recorded the attached video to illustrate a comparison between a slow, single-stage build and a fast, multi-stage build. Here is what you need to do: Split your Dockerfile into independent stages using multiple FROM statements. BuildKit will turn those stages into a dependency graph and run independent stages in parallel. There are several benefits to this: 1. The build process will be way faster. Parallelizing independent stages will save a massive amount of time. 2. You'll get way better caching. Each stage has its own set of layers. If something changes in your build stage, your final stage doesn't get invalidated. get clean final images. You don't need to ship tooling, compilers, or temporary files. You'll only copy to the final image what you need. This has been a massive upgrade to the way I structure my Dockerfiles.

Santiago

67,776 views • 9 months ago

We've officially released and open-sourced HunyuanImage 2.1, our latest text-to-image model. The new model delivers on our commitment to balancing performance and quality. With native 2K image generation, HunyuanImage 2.1 is an advanced open-source text-to-image model.🎨 ✨ New in 2.1: 🔹Advanced Semantics: Supports ultra-long and complex prompts of up to 1000 tokens, and precisely controls the generation of multiple subjects in a single image. 🔹Precise Chinese and English Text Rendering with seamless image–text integration: The model naturally integrates text into images, making it suitable for a wide range of applications such as product covers, illustrations, and poster design to meet the needs of various fields. 🔹Rich Styles and High Aesthetic: Capable of generating images in various styles—including photorealistic portraits, comics, and vinyl figures—it delivers outstanding visual appeal and artistic quality. 🔹High-Quality Generation: Efficiently produces ultra-high-definition (2K) images in the same time other models take to generate a 1K image. HunyuanImage 2.1 uses two text encoders: a multimodal large language model (MLLM) to improve the model's image and text alignment capabilities, and a multi-language character-aware encoder to improve text rendering capabilities. The model is a single- and double-stream diffusion transformer with 17B parameters. We've also open-sourced the weights of the the accelerated version with meanflow which reduces inference steps from 100 to just 8, and PromptEnhancer, the first industrial-grade rewriting model that enhances your prompts for more nuanced and expressive image generation. Now, creators turn complex ideas—like posters with slogans or multi-panel comics—into visuals faster than ever. We’re just getting started. Stay tuned for our native multimodal image generation model coming soon. 🌐Website: 🔗Github: 🤗Hugging Face: ✨Hugging Face Demo:

Tencent Hy

89,257 views • 11 months ago