Created
October 21, 2019 16:45
-
-
Save ericfode/c0d00e75c20549de846b56c8467aaab1 to your computer and use it in GitHub Desktop.
yaml snippet for building pytorch.
This file contains 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 characters
build-pytorch: | |
machine: | |
image: windows-server-2019-nvidia:edge | |
steps: | |
- run: | |
name: Download cudnn | |
command: | | |
$output = "cudnn.zip" | |
$url = "https://storage.googleapis.com/circleci-image-file/cudnn-10.1-windows10-x64-v7.6.4.38.zip" # | |
(New-Object System.Net.WebClient).DownloadFile($url, $output) | |
Expand-Archive -Path $output -DestinationPath C:\cudnn | |
- run: | |
name: Copying cudnn libraries into CUDA's path | |
command: | | |
cp C:\cudnn\cuda\bin\cudnn64_7.dll 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin' | |
cp C:\cudnn\cuda\include\cudnn.h 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include' | |
cp C:\cudnn\cuda\lib\x64\cudnn.lib 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\lib\x64' | |
- run: | |
name: Clone PyTorch | |
command: | | |
git clone --recursive https://github.com/pytorch/pytorch pytorch | |
cd C:/Users/circleci/project/pytorch | |
git submodule sync | |
git submodule update --init --recursive | |
cd .. | |
- run: | |
name: Build PyTorch | |
shell: bash.exe | |
command: | | |
powershell.exe | |
cd C:/Users/circleci/project/pytorch | |
conda install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing | |
python setup.py install | |
cd .. | |
- run: | |
name: Fetch a PyTorch example | |
command: | | |
git clone https://github.com/pytorch/examples | |
cp -r examples/word_language_model/* ./ | |
- run: | |
name: Build a machine learning model | |
command: | | |
python main.py --cuda --epochs 1 | |
resource_class: windows.gpu.small.prototype | |
shell: powershell.exe -ExecutionPolicy Bypass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment