Docker Containerization Guidelines#
Important
By default, all Docker containers are pre-configured and ready to use.
The editable development version of scikit-plots
is already installed,
so you can verify the installation immediately by running:
scikitplot -V
Important
Once the Docker environment is ready to use, you can proceed to the quickstart section to verify the build:
See also
π Docker Containerization#
π‘ Work on Docker Desktop or Github Codespaces
Hereβs how containerization works:
Isolation: Containers run independently of each other and the host system, ensuring that they donβt interfere with other applications or containers.
Portability: Since containers include everything the application needs to run, they can be moved between different environments (like from development to production) without any compatibility issues.
Efficiency: Containers are more lightweight than virtual machines (VMs) because they share the host OSβs kernel rather than running their own separate operating system. This makes them faster and more resource-efficient.
Consistency: The application inside the container runs the same way regardless of where itβs deployed, ensuring consistency across environments.
π·οΈ Github Codespaces Guide#
(Connect IDE Interface Vscode or Jupyter Notebook)
π (recommended) Choose (recommended) not (default) Option for best practise:
Step by step:



π·οΈ Docker Desktop Guide#
## Forked repo: https://github.com/scikit-plots/scikit-plots.git
git clone https://github.com/YOUR-USER-NAME/scikit-plots.git
cd scikit-plots/docker
## Use terminal or open to vscode to run ``docker compose``
code .
Docker Environment Setup for IDE (Vscode/Jupyter) and/or NVIDIA GPU driver
This repository contains Docker & Docker Compose configurations for running Jupyter Notebooks with optional NVIDIA GPU support.
You can run containers with either host-installed CUDA or pre-installed CUDA inside the container.
π³ Docker Compose Quickstart Guide#
(Optionally) π¦ Prebuilt Image from Docker Hub#
See also
You can use the prebuilt image directly from Docker Hub:
π Docker Hub: `https://hub.docker.com/r/scikitplot/scikit-plots`__
# docker pull scikitplot/scikit-plots
docker run -it --rm scikitplot/scikit-plots bash
π·οΈ Using Docker Compose: The easiest way to launch the environment.#
βΆοΈ Run Docker Env Jupyter Notebook (CPU only)
docker compose up --build scikit-plots_latest-jupyter
βΆοΈ Run Docker Env Jupyter Notebook (With NVIDIA Host GPU)
docker compose up --build app_nvidia_host_gpu_driver
βΆοΈ Run Docker Env Jupyter Notebook (With NVIDIA Internal CUDA GPU)
docker compose up --build app_nvidia_internal_gpu_driver
βΆοΈ Run Docker Env Jupyter Notebook by VS Code#
βΆοΈ Connect Docker Container Especially When Docker-GUI dont available
#
# docker-compose up --build scikit-plots_latest-jupyter
docker ps # check running containers
docker logs CONTAINER_ID_OR_NAME # find jupyter (token) http address 127.0....
docker exec -it CONTAINER_ID_OR_NAME bash # Connect interactive terminal
βΆοΈ Run setup_vscode_ext.sh#
## (Optionally) Install common vscode extensions
##β
C/C++/Python and Jupyter Notebook
##β
Linter and Formatter
bash docker/scripts/setup_vscode_ext.sh # (not needed every time)
βΆοΈ Run post_create_commands.sh#
βSee Also: bash-first-run-notice.txtβ
bash-first-run-notice.txt#
π Welcome to the `scikit-plots` Dev Environment (Docker / Codespaces)
π§ Quick Navigation:
β’ π Open the Command Palette β `Ctrl+Shift+P` / `Cmd+Shift+P` or `F1`
β’ π Quick Start β https://scikit-plots.github.io/dev/introduction/quick_start.html
β’ π οΈ Dev Guide β https://scikit-plots.github.io/dev/devel/index.html
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π IMPORTANT: Complete Environment Setup
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
Check Installation:
$ scikitplot -V
$ python -c "import scikitplot; scikitplot.show_config()"
β
Post-Create Setup (Recommended):
$ bash docker/scripts/all_post_create.sh
β
Safe Git Configs:
$ git config --global --add safe.directory '*'
$ git submodule update --init
$ git remote add upstream https://github.com/scikit-plots/scikit-plots.git
$ git fetch upstream --tags
β
Create Environment (Micromamba/Conda):
$ mamba create -n py311 python=3.11 ipykernel -y
$ conda create -n py311 python=3.11 ipykernel -y
$ conda activate py311
β
Install Dependencies:
$ pip install -r requirements/all.txt
$ pre-commit install
$ pip install --no-build-isolation --no-cache-dir -e .
β
(Optional) Install CPU-specific packages:
$ pip install -r requirements/cpu.txt
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π¦ Environment Management Notes:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β’ Activate environments (depending on tool):
$ conda activate py311
$ micromamba activate py311
β’ See environments:
$ conda info -e
$ micromamba info -e
β’ Initialize Conda shell support (if needed):
$ conda init
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π‘ Troubleshooting:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β’ π½ Disk Space:
$ df -h && du -h --max-depth=1
β’ πΎ Creation logs (Codespaces):
β οΈ π Check Codespace Container creation raise `ERROR: ... : No space left on device`
$ cat /workspaces/.codespaces/.persistedshare/creation.log
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Starting Development
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
πΏ Create a new branch before working:
$ git checkout -b feature/my-new-feature
β Proceed to create a branch if you have uncommitted changes and are beginning work on a new feature or bug fix.
π Read more: https://scikit-plots.github.io/dev/devel/quickstart_contributing.html#creating-a-branch
π― Stop Containers#
docker compose down
π³ Docker Compose Configuration#
This project is based on Docker Compose and includes multiple services:
πΉ scikit-plots_latest-jupyter (CPU-Only)
Runs Jupyter Notebook using jupyter/tensorflow-notebook:latest
No CUDA support, best for lightweight tasks
Mounts the local folder scikit-plots to /home/jovyan/work
Runs on port 8888
πΉ app_nvidia_host_gpu_driver (Uses Host CUDA)
Runs Jupyter Notebook using jupyter/tensorflow-notebook:latest
Uses host-installed CUDA for GPU acceleration
Requires NVIDIA runtime enabled (βruntime=nvidia)
Runs on port 8889
πΉ app_nvidia_internal_gpu_driver (CUDA Inside Container)
Runs nvidia/cuda:12.6.3-cudnn-runtime-ubuntu24.04 with pre-installed CUDA
Includes NVIDIA GPU support without needing host CUDA
Requires NVIDIA runtime (βruntime=nvidia)
Runs on port 8890
π οΈ Custom Docker Commands#
If you need more control, you can use Docker CLI commands.
βΆοΈ Build & Run the Container Manually
docker build -t my-custom-container -f docker/Dockerfile .
docker run -it --rm -p 8888:8888 my-custom-container
βΆοΈ Check GPU Availability Inside Container
docker exec -it <container_id> nvidia-smi
π Folder Structure#
docker/
βββ docker-compose.yml # Primary Docker Compose file
βββ docker-compose.override.yml # Optional override file (auto-included if present)
βββ Dockerfile # Custom Dockerfile
βββ scripts/
β βββ install_gpu_nvidia_cuda.sh # GPU setup scripts
π₯οΈ Useful References#
π Jupyter Docker Stacks: Read the Docs
π Docker Compose: Official Docs
π Dockerfile Best Practices
π LocalStack Installation with Docker Compose
π NVIDIA CUDA in Containers: NVIDIA Docs

π Now youβre ready to run Jupyter notebooks in Docker! π