Skip to content

Commit

Permalink
don't run if not on WSL2
Browse files Browse the repository at this point in the history
  • Loading branch information
znmeb committed May 16, 2024
1 parent b708dd5 commit c6a8cdd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions emt_source_code/WSL_container_hosting/1_install_Docker_CE.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

set -e

if ! [[ `uname --kernel-release` =~ "WSL2" ]]
then
echo "WSL2 not detected"
echo "..exit -1024: container hosting is only supported on WSL2"
exit -1024
fi

echo "Clearing 'Logs'"
rm -f Logs/*
export LOGFILE=$PWD/Logs/1_install_Docker_CE.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

set -e

if ! [[ `uname --kernel-release` =~ "WSL2" ]]
then
echo "WSL2 not detected"
echo "..exit -1024: container hosting is only supported on WSL2"
exit -1024
fi

export LOGFILE=$PWD/Logs/2_install_Distrobox.log
export REPOSITORIES=$HOME/.local/repositories
export DISTROBOX_VERSION="1.7.2.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

set -e

if ! [[ `uname --kernel-release` =~ "WSL2" ]]
then
echo "WSL2 not detected"
echo "..exit -1024: container hosting is only supported on WSL2"
exit -1024
fi

export LOGFILE=$PWD/Logs/3_install_NVIDIA_Container_Toolkit.log

echo "Getting COMPUTE_MODE"
Expand Down

0 comments on commit c6a8cdd

Please sign in to comment.