Sign inSign up

lilian1024/opencv

By lilian1024

•Updated 5 days ago

Pre-built OpenCV images ready for development, compilation, and production execution.

Image
Machine learning & AI
Developer tools
0

543

lilian1024/opencv repository overview

⁠OpenCV Docker Images (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.


⁠Supported Tags & Image Variants

Two main categories of image variants are provided depending on hardware and framework requirements:

⁠1. Standard CPU Images (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.x

Features:

  • Base Image: ubuntu:latest
  • Included Dependencies: FFmpeg (video encoding/decoding)
  • Best for: Standard CPU-bound computer vision workloads, lightweight CI/CD pipelines, and cloud microservices.
docker pull lilian1024/opencv:4.x

⁠2. CUDA & cuDNN GPU Images (nvidia/cuda base)

Optimized for high-performance deep learning inference and GPU-accelerated image processing.

  • lilian1024/opencv:4.x-cuda13
  • lilian1024/opencv:5.x-cuda13

Features:

  • Base Image: nvidia/cuda (cuDNN runtime/devel variant)
  • Included Dependencies: CUDA, cuDNN, and FFmpeg
  • Best for: Deep neural network processing, real-time video stream processing, and GPU-accelerated computer vision tasks using NVIDIA GPUs.
docker pull lilian1024/opencv:4.x-cuda13

⁠Quick Start & Usage

These images are designed both as runtime environments and as multi-stage build environments for compiling your own projects.

⁠1. Running an Interactive Container

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
⁠2. Using as a Build Base in your Dockerfile

You 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"]

⁠Build Scripts & Source Repository

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⁠

⁠What's inside the GitHub repository:
  • Standalone Build Script (build_opencv.sh): Automates configuring via CMake and verifying module detection (FFmpeg, GStreamer, CUDA, cuDNN).
  • Dockerfile: Supports configurable --build-arg options to enable or disable specific modules on demand.
  • Verification Engine: Automated check to ensure CMake successfully found and attached requested dependencies before running make.

Feel free to star the repo, submit issues, or contribute new build modules!

Tag summary

Content type

Image

Digest

sha256:68ab141c7…

Size

7.7 GB

Last updated

5 days ago

docker pull lilian1024/opencv:4.x-cuda12.9