Small size docker image that include opencv + python3 + ubuntu. It contains:
- opencv==4.6.0
- Python3.8 @ ubuntu 20.04
- pip installed opencv-python opencv-contrib-python
- Only 185MB in compressed size, 500MB in docker size
docker pull diyer22/tiny_cv2:latest
Or, as base image:
FROM diyer22/tiny_cv2:latest
RUN pip install -r requirements.txt
docker build -t diyer22/tiny_cv2 .
you can change the ubuntu version or opencv version in the Dockerfile
FROM ubuntu:20.04
# Note: Python version is the ubuntu's default python
# For ubuntu:20.04, Python version is 3.8
ARG OPENCV_VERSION=4.6.0
Our dockerfile is modified from dkimg/opencv with those differences:
- No more repeated installation of opencv-python or opencv-contrib-python
- More popular and mature Python version