@@ -20,23 +20,28 @@ variables:
20
20
ldd --version && (/sbin/ldconfig -p | grep stdc++) && (strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep LIBCXX)
21
21
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DE19EB17684BA42D
22
22
sudo apt-get -y update
23
- sudo apt-get -y install cmake git libunwind8 curl libomp-dev libomp5
24
- wget https://packages.microsoft.com/config/ubuntu/22 .04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
23
+ sudo apt-get -y install cmake clang git libunwind8 curl libomp-dev libomp5 wget
24
+ wget https://packages.microsoft.com/config/ubuntu/20 .04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
25
25
sudo dpkg --purge packages-microsoft-prod && sudo dpkg -i packages-microsoft-prod.deb
26
26
sudo apt-get update; sudo apt-get install -y apt-transport-https && sudo apt-get update
27
27
ldd --version && (/sbin/ldconfig -p | grep stdc++) && (strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep LIBCXX)
28
28
29
- # Install Miniconda
30
- wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
31
- mkdir -p ~/miniconda3
32
- wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
33
- bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
34
- rm -rf ~/miniconda3/miniconda.sh
35
-
36
- # Install cmake, clang and gxx_linux-
37
- eval "$(~/miniconda3/bin/conda shell.bash hook)"
38
- source activate base
39
- conda install -y cmake=3.22.1 clang=14.0.6 clangxx=14.0.6 gxx_linux-64=11.2.0
29
+ # Install dotnet
30
+ sudo apt-get install -y dotnet-sdk-6.0
31
+
32
+ # # Install Miniconda
33
+ # wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
34
+ # mkdir -p ~/miniconda3
35
+ # wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
36
+ # bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
37
+ # rm -rf ~/miniconda3/miniconda.sh
38
+
39
+ # # Install cmake, clang and gxx_linux-
40
+ # eval "$(~/miniconda3/bin/conda shell.bash hook)"
41
+ # source activate base
42
+ # # Add forge channel
43
+ # conda config --add channels conda-forge
44
+ # conda install -y cmake=3.22.1 clang=8.0.0 clangxx=8.0.0 gcc=8.5.0 gxx=8.5.0
40
45
41
46
42
47
resources :
57
62
# the generated libTorchSharp.so (and partly determines which Linux systems that binary will
58
63
# be usable on), then installs clang-7.0 (LibTorch likes this for building C++ 14), then installs .NET 6.0
59
64
prepScript : ${{ variables.LinuxPrepScript }}
60
- buildScript : eval "$(~/miniconda3/bin/conda shell.bash hook)" &&
61
- source activate base &&
62
- dotnet build /p:SkipCuda=true -c
63
- testScript : eval "$(~/miniconda3/bin/conda shell.bash hook)" &&
64
- source activate base &&
65
- dotnet test /p:SkipCuda=true --blame test/TorchSharpTest/TorchSharpTest.csproj -c
65
+ buildScript : dotnet build /p:SkipCuda=true -c
66
+ testScript : dotnet test /p:SkipCuda=true --blame test/TorchSharpTest/TorchSharpTest.csproj -c
66
67
pool :
67
68
vmImage : ' ubuntu-latest'
68
69
container : UbuntuContainer
@@ -132,36 +133,21 @@ jobs:
132
133
- script : ${{ variables.LinuxPrepScript }}
133
134
displayName : Install dependencies
134
135
135
- - script : |
136
- eval "$(~/miniconda3/bin/conda shell.bash hook)"
137
- source activate base
138
- dotnet build -c $(BuildConfig) src/Redist/libtorch-cpu/libtorch-cpu.proj /p:UpdateSHA=true /p:SkipTests=true /p:TargetOS=linux /t:Build /p:IncludeLibTorchCpuPackages=true
136
+ - script : dotnet build -c $(BuildConfig) src/Redist/libtorch-cpu/libtorch-cpu.proj /p:UpdateSHA=true /p:SkipTests=true /p:TargetOS=linux /t:Build /p:IncludeLibTorchCpuPackages=true
139
137
condition : eq(variables['BuildLibTorchPackages'], 'true')
140
138
displayName : Download libtorch native binaries
141
139
142
- - script : |
143
- eval "$(~/miniconda3/bin/conda shell.bash hook)"
144
- source activate base
145
- dotnet build -c $(BuildConfig) src/Redist/libtorch-cuda-12.1/libtorch-cuda-12.1.proj /p:UpdateSHA=true /p:SkipTests=true /p:TargetOS=linux /t:Build /p:IncludeLibTorchCudaPackages=true
140
+ - script : dotnet build -c $(BuildConfig) src/Redist/libtorch-cuda-12.1/libtorch-cuda-12.1.proj /p:UpdateSHA=true /p:SkipTests=true /p:TargetOS=linux /t:Build /p:IncludeLibTorchCudaPackages=true
146
141
condition : eq(variables['BuildLibTorchPackages'], 'true')
147
142
displayName : Download libtorch native CUDA binaries
148
143
149
- - script : |
150
- eval "$(~/miniconda3/bin/conda shell.bash hook)"
151
- source activate base
152
- dotnet build -c $(BuildConfig) src/TorchSharp/TorchSharp.csproj /p:SkipCuda=true /p:SkipTests=true
144
+ - script : dotnet build -c $(BuildConfig) src/TorchSharp/TorchSharp.csproj /p:SkipCuda=true /p:SkipTests=true
153
145
displayName : Build linux
154
146
155
- - script : |
156
- eval "$(~/miniconda3/bin/conda shell.bash hook)"
157
- source activate base
158
- dotnet build -c $(BuildConfig) src/TorchVision/TorchVision.csproj /p:SkipCuda=true /p:SkipTests=true
147
+ - script : dotnet build -c $(BuildConfig) src/TorchVision/TorchVision.csproj /p:SkipCuda=true /p:SkipTests=true
159
148
displayName : Build TorchVision
160
149
161
- - script : |
162
- eval "$(~/miniconda3/bin/conda shell.bash hook)"
163
- source activate base
164
- dotnet build -c $(BuildConfig) src/TorchAudio/TorchAudio.csproj /p:SkipCuda=true /p:SkipTests=true
150
+ - script : dotnet build -c $(BuildConfig) src/TorchAudio/TorchAudio.csproj /p:SkipCuda=true /p:SkipTests=true
165
151
displayName : Build TorchAudio
166
152
167
153
- publish : $(Build.SourcesDirectory)/bin/obj/packprep/$(BuildConfig)
0 commit comments