From 05a5710b54d824c6e0e79ea963abffb25b861a79 Mon Sep 17 00:00:00 2001 From: Yuvi Panda Date: Fri, 14 Feb 2025 09:29:30 -0800 Subject: [PATCH] MNT: Check if running inside repo2docker more explicitly .dockerenv is only supported in the old docker based builder, which has been deprecated for a few years now. It isn't supported by buildkit / docker buildx, which repo2docker *just* moved to (https://github.com/jupyterhub/repo2docker/pull/1402). Using buikdkit gives us faster and more reliable builds. This converts the test for checking if the script is being run by repo2docker to check for an env var that repo2docker sets instead. --- .binder/postBuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.binder/postBuild b/.binder/postBuild index 37289784b380c..dd9b714721e39 100644 --- a/.binder/postBuild +++ b/.binder/postBuild @@ -6,7 +6,7 @@ set -e # inside a git checkout of the scikit-learn/scikit-learn repo. This script is # generating notebooks from the scikit-learn python examples. -if [[ ! -f /.dockerenv ]]; then +if [[ -z "${REPO_DIR}" ]];; then echo "This script was written for repo2docker and is supposed to run inside a docker container." echo "Exiting because this script can delete data if run outside of a docker container." exit 1