From a37b28ab2ef964c7f8f9864ed7e701e02a8fb4e1 Mon Sep 17 00:00:00 2001 From: Yosef Durr Date: Wed, 29 Aug 2018 23:27:32 -0700 Subject: [PATCH] Install tools in WSL, starting with just the ML recipe (#68) --- README.md | 11 ++--------- dev_ml_wsl.ps1 | 7 +++++++ scripts/VirtualizationTools.ps1 | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 3b500df..6688574 100644 --- a/README.md +++ b/README.md @@ -21,16 +21,9 @@ A recipe is the script you run. It calls multiple helper scripts. These curren ## You may want to customize the scripts These scripts should cover a lot of what you need but will not likely match your personal preferences exactly. In this case please fork the project and change the scripts however you desire. We really appreciate PR's back to this project if you have recommended changes. -*Note: When you fork make sure to update these variables in your recipe* +*Note: To use the Readme links for your fork you'll need to update the links to refer to your fork as follows:* -` -$user = "Microsoft"; -$baseBranch = "master"; -` - -*You will also need to update the single click URL for your modified script to refer to your fork:* - -`http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/GITHUB_DOMAIN/windows-dev-box-setup-scripts/YOUR_BRANCH/dev_web_nodejs.ps +`http://boxstarter.org/package/url?https://raw.githubusercontent.com/GITHUB_DOMAIN/windows-dev-box-setup-scripts/YOUR_BRANCH/RECIPE_NAME.ps ` For more info on testing your changes take a look at the [contribution guidelines](CONTRIBUTING.md). diff --git a/dev_ml_wsl.ps1 b/dev_ml_wsl.ps1 index 0ed3ba4..3c28f4b 100644 --- a/dev_ml_wsl.ps1 +++ b/dev_ml_wsl.ps1 @@ -34,6 +34,13 @@ executeScript "VirtualizationTools.ps1"; executeScript "GetMLPythonSamplesOffGithub.ps1"; # TODO: now install additional ML tools inside the WSL distro once default user w/blank password is working +write-host "Installing tools inside the WSL distro..." +Ubuntu1804 run apt update +Ubuntu1804 run apt upgrade -y +Ubuntu1804 run apt install python3 python-pip -y +Ubuntu1804 run apt install python-numpy python-scipy pandas -y +Ubuntu1804 run pip install -U scikit-learn +write-host "Finished installing tools inside the WSL distro" Enable-UAC Enable-MicrosoftUpdate diff --git a/scripts/VirtualizationTools.ps1 b/scripts/VirtualizationTools.ps1 index 31eeb7e..786ec6c 100644 --- a/scripts/VirtualizationTools.ps1 +++ b/scripts/VirtualizationTools.ps1 @@ -1,8 +1,8 @@ choco install -y Microsoft-Windows-Subsystem-Linux -source windowsfeatures choco install -y Microsoft-Hyper-V-All -source windowsFeatures -Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName Microsoft-Windows-Subsystem-Linux -Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName Microsoft-Hyper-V +# alternative to above: Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName Microsoft-Windows-Subsystem-Linux +# alternative to above: Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName Microsoft-Hyper-V choco install -y docker-for-windows choco install -y vscode-docker @@ -10,10 +10,12 @@ choco install -y vscode-docker #--- Ubuntu --- Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile ~/Ubuntu.appx -UseBasicParsing Add-AppxPackage -Path ~/Ubuntu.appx - -# TODO reboot here +# run the distro once and have it install locally with a blank root user +Ubuntu1804 install --root <# +NOTE: Other distros can be scripted the same way for example: + #--- SLES --- # Install SLES Store app Invoke-WebRequest -Uri https://aka.ms/wsl-sles-12 -OutFile ~/SLES.appx -UseBasicParsing @@ -27,5 +29,3 @@ Add-AppxPackage -Path ~/openSUSE.appx # Launch openSUSE opensuse-42.exe #> - -# TODO: add tool installation inside Ubuntu \ No newline at end of file