{"id":13575307,"url":"https://github.com/osai-ai/dokai","last_synced_at":"2025-04-04T22:30:47.681Z","repository":{"id":42687382,"uuid":"296554030","full_name":"osai-ai/dokai","owner":"osai-ai","description":"Collection of Docker images for ML/DL and video processing projects","archived":false,"fork":false,"pushed_at":"2024-05-22T10:37:10.000Z","size":698,"stargazers_count":99,"open_issues_count":1,"forks_count":14,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-05-22T11:33:00.396Z","etag":null,"topics":["cuda","deep-learning","docker","docker-image","ffmpeg","opencv","python","pytorch","tensorrt","video-processing"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osai-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-18T07:59:36.000Z","updated_at":"2024-05-22T11:33:10.612Z","dependencies_parsed_at":"2024-05-22T11:43:04.676Z","dependency_job_id":null,"html_url":"https://github.com/osai-ai/dokai","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osai-ai%2Fdokai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osai-ai%2Fdokai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osai-ai%2Fdokai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osai-ai%2Fdokai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osai-ai","download_url":"https://codeload.github.com/osai-ai/dokai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247260331,"owners_count":20909990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cuda","deep-learning","docker","docker-image","ffmpeg","opencv","python","pytorch","tensorrt","video-processing"],"created_at":"2024-08-01T15:00:59.871Z","updated_at":"2025-04-04T22:30:45.765Z","avatar_url":"https://github.com/osai-ai.png","language":"Makefile","funding_links":[],"categories":["Makefile"],"sub_categories":[],"readme":"![dokai-logo](https://raw.githubusercontent.com/osai-ai/dokai/master/pics/dokai-logo.png)\n\nCollection of Docker images for ML/DL and video processing projects.\n\n## Overview of `cpu.*` images\n\nSeveral types of images are presented:\n\n* `core`: Python (3.11.9)\n* `ffmpeg`: FFmpeg (6.1)\n* `base`: Python ML and CV packages listed [here](requirements/pip/base.txt)\n* `pytorch`: PyTorch (2.1.2), torchvision (0.16.2), torchaudio (2.1.2) and torch based libraries listed [here](requirements/pip/pytorch.txt)\n\n## Overview of `gpu.*` images\n\nSeveral types of images are presented:\n\n* `core`: CUDA (12.2.2), cuDNN (8.9.6), Python (3.11.9)\n* `ffmpeg`: FFmpeg (6.1) with NVENC/NVDEC support\n* `base`: Python ML and CV packages listed [here](requirements/pip/base.txt)\n* `pytorch`: TensorRT (9.2.0), PyTorch (2.1.2), torchvision (0.16.2), torchaudio (2.1.2) and torch based libraries listed [here](requirements/pip/pytorch.txt)\n* `video`: VideoProcessingFramework (2.0.0) and Tensor Stream (0.5.0) for full HW acceleration of video decoding\n\nSupported NVIDIA architectures: Pascal (sm_60, sm_61), Volta (sm_70), Turing (sm_75), Ampere (sm_80, sm_86), Ada Lovelace (sm_89), Hopper (sm_90).  \nYou can identify the architecture of your GPU [here](https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/).\n\n## Overview of `gpu.*.opt` images\n\nThere are also optimized GPU images based on `nvidia-runtime` images, which have the same packages and libraries installed as stated above.\nTo install them add `.opt` suffix at the end of the docker image name, e.g. `dokai:gpu.pytorch.opt`.\n\n\u003cdetails\u003e\u003csummary\u003eDifference between `nvidia-devel` and `nvidia-runtime` images\u003c/summary\u003e\n\u003cp\u003e\nNvidia's CUDA images come in three flavors and are available through the NVIDIA public hub repository.\n\n* **base**: starting from CUDA 9.0, contains the bare minimum (libcudart) to deploy a pre-built CUDA application. Use this image if you want to select which CUDA packages you want to install manually.\n* **runtime**: extends the base image by adding all the shared libraries from the CUDA toolkit. Use this image if you have a pre-built application using multiple CUDA libraries.\n* **devel**: extends the runtime image by adding the compiler toolchain, the debugging tools, the headers, and the static libraries. Use this image to compile a CUDA application from sources.\n\n![Comparison of NVIDIA images](pics/nvidia.png)\n\n**Runtime** and **devel** are the ones that are mostly used and the differences between them are the image sizes (~3Gb), presence of compilers, and debugging tools.\n\u003c/p\u003e\n\u003c/details\u003e\n\n## Overview of `*.rootless` images\n\nInitially, all Dokai images were root-based, meaning that they had root privileges inside of the docker container.\nAccording to the [Docker best-practices](https://docs.docker.com/build/building/best-practices/#user)\nit is better to run docker containers without sudo rights with explicitly set user. Because of that \n`*.rootless` images were added to duplicate all existing images, but without sudo privileges.\nThe name of the user is set to `dokai` and it has `1000` set as UID/GID.\n\nSooner or later these images will fully replace root-based ones as they are more secure.\n\n## Examples\n\nPull an image from the GitHub Container [registry](https://github.com/osai-ai/dokai/pkgs/container/dokai)\n```bash\ndocker pull ghcr.io/osai-ai/dokai:24.06-gpu.pytorch\n```\n\nDocker Hub [mirror](https://hub.docker.com/r/osaiai/dokai/tags)\n```bash\ndocker pull osaiai/dokai:24.06-gpu.pytorch\n```\n\nCheck available GPUs inside the container\n```bash\ndocker run --rm \\\n    --gpus=all \\\n    ghcr.io/osai-ai/dokai:24.06-gpu.pytorch \\\n    nvidia-smi\n```\n\n##### In case of `*.rootless` images there may permission problems happen within docker container:\n\n- If the source code is copied to the container with the command `COPY`, make sure to change the owner\nof the copied files and folders with additional flag, for example:\n\n```bash\nFROM dokai:gpu.video.opt.rootless\n\nWORKDIR /home/$UNAME/workdir\nCOPY --chown=$UID:$GID ./ ./\n\n...\n```\n\n- If the source code is mounted as a volume with the flag `-v` make sure to mount it to the correct \nuser home directory path, and `--user` flag is passed, for example like this:\n\n```bash\ndocker run --rm -it \\\n    --user=$(id -u):$(id -g) \\\n\t-v $(shell pwd):/home/dokai/workdir \\\n\tghcr.io/osai-ai/dokai:24.06-gpu.pytorch.opt.rootless \\\n\tbash\n```\n\nOr make sure that the mounted volume has enough permission for the `dokai:1000:1000` user to work.\n\nThe result of above commands strongly depends on the local setup, although it should work in most cases.\n\n## Package versions\n\n![Dokai images overview](pics/comparison.png)\n\n### CPU images\n\n\u003cdetails\u003e\u003csummary\u003edokai:24.06-cpu.core\u003c/summary\u003e\n\u003cp\u003e\n\n[ghcr.io/osai-ai/dokai:24.06-cpu.core](https://github.com/osai-ai/dokai/pkgs/container/dokai)\n\nImage based on `python:3.11.9-slim-bookworm` which includes:\n\n- Debian Bookworm Operational System;\n- Python 3.11.9;\n- etc..\n\nOn top of that packages are installed, here's a brief description and purpose of each:\n\n**Utilities:**\n- **nano, vim, tmux** are text editors and terminal multiplexers used for editing files and managing terminal sessions.\n- **unzip** is a utility used to decompress ZIP archives, commonly used for extracting files from compressed archives.\n- **git** is a distributed version control system used for tracking changes in source code during software development.\n- **wget, curl** are command-line tools used for downloading files from the internet, commonly used in scripts and automation tasks.\n- **htop** is interactive system monitoring tool used for displaying system resource usage.\n- **sysstat** collects and reports system performance statistics, including CPU, memory, and disk usage.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003edokai:24.06-cpu.ffmpeg\u003c/summary\u003e\n\u003cp\u003e\n\n[ghcr.io/osai-ai/dokai:24.06-cpu.ffmpeg](https://github.com/osai-ai/dokai/pkgs/container/dokai)\n\nImage based on `dokai:24.06-cpu.core`:\n\nAdditionally, installed:\n\n- FFmpeg (n6.1)\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003edokai:24.06-cpu.base\u003c/summary\u003e\n\u003cp\u003e\n\n[ghcr.io/osai-ai/dokai:24.06-cpu.base](https://github.com/osai-ai/dokai/pkgs/container/dokai)\n\nImage based on `dokai:24.06-cpu.ffmpeg`:\n\nAdditionally, installed:\n\n- Python ML and CV packages: [requirements.txt](requirements/pip/base.txt)\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003edokai:24.06-cpu.pytorch\u003c/summary\u003e\n\u003cp\u003e\n\n[ghcr.io/osai-ai/dokai:24.06-cpu.pytorch](https://github.com/osai-ai/dokai/pkgs/container/dokai)\n\nImage based on `dokai:24.06-cpu.base`:\n\nAdditionally, installed:\n\n- Pytorch, torch-audio, torch-vision;\n- Pytorch-related packages: [requirements.txt](requirements/pip/pytorch.txt)\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n### GPU images built from source\n\n\u003cdetails\u003e\u003csummary\u003edokai:24.06-gpu.core\u003c/summary\u003e\n\u003cp\u003e\n\n[ghcr.io/osai-ai/dokai:24.06-gpu.core](https://github.com/osai-ai/dokai/pkgs/container/dokai)\n\nImage based on `nvidia/cuda:12.2.2-cudnn8-devel-ubuntu22.04` which includes:\n\n- Ubuntu 22.04 Operational System;\n- CUDA (12.2.2);\n- cuDNN (8.9.6);\n- NVCC;\n- etc..\n\nOn top of that packages are installed, here's a brief description and purpose of each:\n\n**Python (3.11.9):**\n- **python3.11** is a programming language used for scripting and software development.\n- **python3.11-dev** contains header files and development tools for building Python extensions.\n- **python3.11-distutils** contains utilities for distributing and installing Python packages.\n- **python3.11-tk** contains Tkinter, a GUI toolkit for Python.\n\n**Builders, configurators and compilers:**\n- **build-essential** package contains essential tools required for building software on Ubuntu, including compilers (gcc, g++, etc.) and build-related tools.\n- **Yasm and nasm** are assemblers used for compiling assembly language code into machine-readable format, commonly used in building software.\n- **Ninja** is a small build system that is fast and efficient, used as an alternative to GNU Make in some projects.\n- **cmake** is a cross-platform build system generator used to control the software compilation process using simple platform-independent configuration files.\n- **pkgconf** is a package configuration system used to help locate and configure libraries needed for building software.\n- **gfortran** is a GNU Fortran compiler used for compiling Fortran code.\n- **autoconf and libtool** are tools for generating configure scripts and managing software builds on various platforms.\n\n**Utilities:**\n- **nano, vim, tmux** are text editors and terminal multiplexers used for editing files and managing terminal sessions.\n- **unzip** is a utility used to decompress ZIP archives, commonly used for extracting files from compressed archives.\n- **git** is a distributed version control system used for tracking changes in source code during software development.\n- **wget, curl** are command-line tools used for downloading files from the internet, commonly used in scripts and automation tasks.\n- **htop and nvtop** are interactive system monitoring tools used for displaying system resource usage.\n- **sysstat** collects and reports system performance statistics, including CPU, memory, and disk usage.\n\n**Libraries:**\n- **libsm6, libxext6, libxrender1, libgl1-mesa-glx** libraries for X Window System used for rendering graphics and managing graphical applications.\n- **libtcmalloc-minimal4** is a memory allocation library, providing optimized memory management functions.\n- **libx264-dev** is a library for encoding H.264 video streams.\n- **libsndfile1** is a library for reading and writing audio files.\n- **libssl-dev** is a development package for OpenSSL, providing cryptographic functions.\n- **libpng-dev and libjpeg-dev** are development libraries for handling PNG and JPEG image formats, respectively.\n- **libmp3lame-dev** is a development library for encoding and decoding MP3 audio files.\n- **liblapack-dev** is a library for numerical linear algebra functions.\n- **libopenblas-dev** is an optimized BLAS (Basic Linear Algebra Subprograms) library.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003edokai:24.06-gpu.ffmpeg\u003c/summary\u003e\n\u003cp\u003e\n\n[ghcr.io/osai-ai/dokai:24.06-gpu.ffmpeg](https://github.com/osai-ai/dokai/pkgs/container/dokai)\n\nImage based on `dokai:24.06-gpu.core`:\n\nAdditionally, installed:\n\n- FFmpeg (n6.1)\n- nv-codec-headers (n12.1.14.0)\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003edokai:24.06-gpu.base\u003c/summary\u003e\n\u003cp\u003e\n\n[ghcr.io/osai-ai/dokai:24.06-gpu.base](https://github.com/osai-ai/dokai/pkgs/container/dokai)\n\nImage based on `dokai:24.06-gpu.ffmpeg`:\n\nAdditionally, installed:\n\n- Python ML and CV packages: [requirements.txt](requirements/pip/base.txt)\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003edokai:24.06-gpu.pytorch\u003c/summary\u003e\n\u003cp\u003e\n\n[ghcr.io/osai-ai/dokai:24.06-gpu.pytorch](https://github.com/osai-ai/dokai/pkgs/container/dokai)\n\nImage based on `dokai:24.06-gpu.base`.\n\nAdditionally, installed:\n\n- TensorRT (9.2.0)\n- MAGMA (2.7.1)\n- Pytorch, torch-audio, torch-vision;\n- Pytorch-related packages: [requirements.txt](requirements/pip/pytorch.txt)\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003edokai:24.06-gpu.video\u003c/summary\u003e\n\u003cp\u003e\n\n[ghcr.io/osai-ai/dokai:24.06-gpu.video](https://github.com/osai-ai/dokai/pkgs/container/dokai)\n\nImage based on `dokai:24.06-gpu.pytorch`.\n\nAdditionally, installed:\n\n- VideoProcessingFramework==2.0.0 (source, v2.0.0)  \n- tensor-stream==0.5.0 (source, 0.5.0)\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n### GPU images optimized\n\nOptimized set is composed of the previous one but based on lighter NVIDIA `runtime` base image.  \n\n\u003cdetails\u003e\u003csummary\u003edokai:24.06-gpu.core.opt\u003c/summary\u003e\n\u003cp\u003e\n\n[ghcr.io/osai-ai/dokai:24.06-gpu.core.opt](https://github.com/osai-ai/dokai/pkgs/container/dokai)\n\nImage based on `nvidia/cuda:12.2.2-cudnn8-runtime-ubuntu22.04` and includes the same\nadditionally installed packages as `dokai:24.06-gpu.core`.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\u003csummary\u003edokai:24.06-gpu.ffmpeg.opt\u003c/summary\u003e\n\u003cp\u003e\n\n[ghcr.io/osai-ai/dokai:24.06-gpu.ffmpeg.opt](https://github.com/osai-ai/dokai/pkgs/container/dokai)\n\nImage based on `dokai:24.06-gpu.core.opt` and includes the same\nadditionally installed packages as `dokai:24.06-gpu.ffmpeg`.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\u003csummary\u003edokai:24.06-gpu.base.opt\u003c/summary\u003e\n\u003cp\u003e\n\n[ghcr.io/osai-ai/dokai:24.06-gpu.base.opt](https://github.com/osai-ai/dokai/pkgs/container/dokai)\n\nImage based on `dokai:24.06-gpu.ffmpeg.opt`  and includes the same\nadditionally installed packages as `dokai:24.06-gpu.base`.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\u003csummary\u003edokai:24.06-gpu.pytorch.opt\u003c/summary\u003e\n\u003cp\u003e\n\n[ghcr.io/osai-ai/dokai:24.06-gpu.pytorch.opt](https://github.com/osai-ai/dokai/pkgs/container/dokai)\n\nImage based on `dokai:24.06-gpu.base.opt`  and includes the same\nadditionally installed packages as `dokai:24.06-gpu.pytorch`.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\u003csummary\u003edokai:24.06-gpu.video.opt\u003c/summary\u003e\n\u003cp\u003e\n\n[ghcr.io/osai-ai/dokai:24.06-gpu.video.opt](https://github.com/osai-ai/dokai/pkgs/container/dokai)\n\nImage based on `dokai:24.06-gpu.pytorch.opt`  and includes the same\nadditionally installed packages as `dokai:24.06-gpu.video`.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n### Performance comparison\n\n\n\u003cdetails\u003e\u003csummary\u003e`dokai:23.12-pytorch` vs `dokai:24.04-gpu.pytorch`\u003c/summary\u003e\n\u003cp\u003e\n\n![Comparison of releases](pics/release_comparison.png)\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n### Size comparison\n\n| Image   | cpu.*\\[.rootless\\] | gpu.*\\[.rootless\\] | gpu.*.opt\\[.rootless\\] |\n|---------|--------------------|--------------------|------------------------|\n| core    | 0.49Gb             | 11Gb               | 4.5Gb                  |\n| ffmpeg  | 0.74Gb             | 11Gb               | 4.6Gb                  |\n| base    | 2.0Gb              | 12Gb               | 5.6Gb                  |\n| pytorch | -                  | 17Gb               | 12Gb                   |\n| video   | -                  | 17Gb               | 12Gb                   |\n\nVersions for past releases can be found in [release descriptions](https://github.com/osai-ai/dokai/releases).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosai-ai%2Fdokai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosai-ai%2Fdokai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosai-ai%2Fdokai/lists"}