running_in_docker#

scikitplot.mlflow.running_in_docker()[source]#

Detect whether the current process is running in a Docker container.

Returns:
bool

True if the file /.dockerenv exists, else False.

Return type:

bool

Notes

This check is intentionally strict and deterministic: - It relies only on /.dockerenv (common in Docker containers). - It does not attempt cgroup inference or other heuristics.