mlcommons / cm4mlops

A collection of portable, reusable and cross-platform automation recipes (CM scripts) to make it easier to build and benchmark AI systems across diverse models, data sets, software and hardware
http://docs.mlcommons.org/cm4mlops/
Apache License 2.0
15 stars 20 forks source link

Capture whether a script is run inside a docker #516

Open anandhu-eng opened 2 weeks ago

anandhu-eng commented 2 weeks ago

We can determine whether we are inside a Docker container by checking for the presence of the /.dockerenv file. However, we need to ascertain whether this method is limited to Linux Docker images and if there is a better approach to achieve this.

anandhu-eng commented 2 weeks ago

Article: https://forums.docker.com/t/detect-you-are-running-in-a-docker-container-buildx/139673/4