Last active
April 3, 2025 11:59
Revisions
-
coderhh revised this gist
Oct 1, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -38,7 +38,7 @@ if(!(Test-Path "cuda.exe")){ Write-Host "Installing cuDNN" -ForegroundColor Green if(!(Test-Path "cudnn.zip")){ Invoke-Webrequest -uri "http://download1491.mediafire.com/8glofqtxelzg/47vmj62ysaytdps/cudnn-10.1-windows10-x64-v7.6.5.32.zip -OutFile cudnn.zip }else{ If (Test-Path "cudnn") -
coderhh revised this gist
Sep 30, 2020 . 1 changed file with 39 additions and 17 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,36 +3,58 @@ Author: Yehang Han #> Clear-Host # 1. Install Microsoft Visual C++ Compiler Write-Host "Installing Microsoft Visual C++ Compiler" -ForegroundColor Green if (Get-Module -ListAvailable -Name VSSetup) { #Write-Host "Module VSSetup exists" } else { #Write-Host "Module VSSetup does not exist" Install-Module -Name VSSetup } if (Get-VSSetupInstance -All | Select-VSSetupInstance -Require 'Microsoft.VisualStudio.Workload.NativeDesktop' -Latest) { Write-Host "Microsoft Visual C++ Compiler exists, skipping..." -ForegroundColor Green } else { Write-Host "Microsoft Visual C++ Compiler not exist" -ForegroundColor Green -BackgroundColor White Invoke-Webrequest -uri "https://download.visualstudio.microsoft.com/download/pr/9fcc1f0c-c63f-4424-bc46-7351a59fba06/1ed7863dc633c57c42a88c5cef907048/vs_community.exe" -OutFile vs_community.exe Start-Process -NoNewWindow -FilePath "vs_community.exe" -ArgumentList "--layout c:\vslayout","--add Microsoft.VisualStudio.Workload.NativeDesktop","--includeRecommended", "--lang en-US" Start-Process -NoNewWindow -FilePath "c:\vslayout\vs_community.exe" -ArgumentList "--noweb", "--add Microsoft.VisualStudio.Workload.NativeDesktop","--includeOptional" } # 2. Install CUDA Toolkit Write-Host "Installing CUDA Toolkit" -ForegroundColor Green if(!(Test-Path "cuda.exe")){ Invoke-Webrequest -uri "http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_426.00_win10.exe" -OutFile cuda.exe }else{ Start-Process -NoNewWindow -FilePath "cuda.exe" -ArgumentList "-s" -ErrorAction Stop } # 3. Install cuDNN Write-Host "Installing cuDNN" -ForegroundColor Green if(!(Test-Path "cudnn.zip")){ Invoke-Webrequest -uri "https://developer.nvidia.com/compute/machine-learning/cudnn/secure/8.0.3.33/10.1_20200825/cudnn-10.1-windows10-x64-v8.0.3.33.zip" -OutFile cudnn.zip }else{ If (Test-Path "cudnn") { Remove-Item "cudnn" -Recurse } Expand-Archive -Path cudnn.Zip -DestinationPath cudnn -ErrorAction Stop # Back up cudnn folders Compress-Archive -Path "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\*" bin_bak.zip Compress-Archive -Path "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include\*" include_bak.zip Compress-Archive -Path "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\lib\x64\*" lib_x64_bak.zip Copy-Item .\cudnn\cuda\bin\*.dll "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin" Copy-Item .\cudnn\cuda\include\*.h "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" Copy-Item .\cudnn\cuda\lib\x64\*.lib "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\lib\x64" } # 4. Install TensorFlow· -
coderhh renamed this gist
Sep 29, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
coderhh created this gist
Sep 29, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ <# Script to setup gpu support for tensorflow on Windows 10 Author: Yehang Han #> # 1. Install Microsoft Visual C++ Compiler if (Get-Module -ListAvailable -Name VSSetup) { Write-Host "Module VSSetup exists" } else { Write-Host "Module VSSetup does not exist" Install-Module -Name VSSetup } if (Get-VSSetupInstance -All | Select-VSSetupInstance -Require 'Microsoft.VisualStudio.Workload.ManagedDesktop' -Latest) { Write-Host "Microsoft Visual C++ Compiler exist" } else { Write-Host "Microsoft Visual C++ Compiler not exist" Invoke-Webrequest -uri "https://download.visualstudio.microsoft.com/download/pr/9fcc1f0c-c63f-4424-bc46-7351a59fba06/1ed7863dc633c57c42a88c5cef907048/vs_community.exe" -OutFile vs_community.exe #Start-Process -NoNewWindow -FilePath "vs_community.exe" -ArgumentList "--layout c:\vslayout","--add Microsoft.VisualStudio.Workload.NativeDesktop","--includeRecommended", "--lang en-US" } Invoke-Webrequest -uri "https://download.visualstudio.microsoft.com/download/pr/9fcc1f0c-c63f-4424-bc46-7351a59fba06/1ed7863dc633c57c42a88c5cef907048/vs_community.exe" -OutFile vs_community.exe #Start-Process -NoNewWindow -FilePath "vs_community.exe" -ArgumentList "--layout c:\vslayout","--add Microsoft.VisualStudio.Workload.NativeDesktop","--includeRecommended", "--lang en-US" #Start-Process -NoNewWindow -FilePath "c:\vslayout\vs_community.exe" -ArgumentList "--noweb", "--add Microsoft.VisualStudio.Workload.NativeDesktop","--includeOptional" #c:\vslayout\vs_community.exe --noweb --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Component.GitHub.VisualStudio --includeOptional #vs_community.exe --layout c:\vslayout --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --lang en-US # 2. Install CUDA Toolkit # 3. Install cuDNN # 4. Install TensorFlow