Pre-built OpenCV images ready for development, compilation, and production execution.
543
lilian1024/opencv)Docker images providing pre-built OpenCV environments ready for development, compilation, and production execution.
These images include core development headers, libraries, and common dependencies (such as video backends or GPU acceleration), allowing you to quickly build and run C++ applications that depend on OpenCV without waiting for lengthy compilation times.
Two main categories of image variants are provided depending on hardware and framework requirements:
ubuntu:latest base)Designed for lightweight deployment and standard CPU processing.
lilian1024/opencv:4.x (and specific minor versions like 4.14.0)lilian1024/opencv:5.xFeatures:
ubuntu:latestdocker pull lilian1024/opencv:4.x
nvidia/cuda base)Optimized for high-performance deep learning inference and GPU-accelerated image processing.
lilian1024/opencv:4.x-cuda13lilian1024/opencv:5.x-cuda13Features:
nvidia/cuda (cuDNN runtime/devel variant)docker pull lilian1024/opencv:4.x-cuda13
These images are designed both as runtime environments and as multi-stage build environments for compiling your own projects.
Run a container with interactive bash access:
# CPU Version
docker run -it --rm lilian1024/opencv:4.x bash
# GPU Version (Requires NVIDIA Container Toolkit)
docker run -it --rm --gpus all lilian1024/opencv:4.x-cuda13 bash
DockerfileYou can use lilian1024/opencv as a base image to compile C++ projects without needing to rebuild OpenCV from source:
# Example: Building a C++ OpenCV project
FROM lilian1024/opencv:4.x AS builder
WORKDIR /app
COPY . .
# Compile your application
RUN g++ -O3 main.cpp -o my_opencv_app $(pkg-config --cflags --libs opencv4)
CMD ["./my_opencv_app"]
Want to build a custom version of OpenCV with a different combination of modules?
The scripts, configuration tools, and Dockerfile used to generate these images are open source and available on GitHub:
GitHub Repository: lillian1024/DockerOpenCVDev
build_opencv.sh): Automates configuring via CMake and verifying module detection (FFmpeg, GStreamer, CUDA, cuDNN).--build-arg options to enable or disable specific modules on demand.make.Feel free to star the repo, submit issues, or contribute new build modules!
Content type
Image
Digest
sha256:68ab141c7…
Size
7.7 GB
Last updated
5 days ago
docker pull lilian1024/opencv:4.x-cuda12.9