Skip to content

Commit

Permalink
copy over changes (#615)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Zook <azook@nvidia.com>

forgot docker files...

Signed-off-by: Alex Zook <azook@nvidia.com>

replace 'and' with '&&' for windows

Signed-off-by: Alex Zook <azook@nvidia.com>

remove camera example from windows due to nvdiffrast dependency.

re-trigger CI

Signed-off-by: Alex Zook <azook@nvidia.com>

Signed-off-by: Alex Zook <azook@nvidia.com>
Co-authored-by: Alex Zook <azook@nvidia.com>
  • Loading branch information
zookae and zookae committed Aug 19, 2022
1 parent 4eefe96 commit 9085d14
Show file tree
Hide file tree
Showing 16 changed files with 611 additions and 124 deletions.
24 changes: 0 additions & 24 deletions ci/build-windows-no-cache.ps1

This file was deleted.

24 changes: 0 additions & 24 deletions ci/build-windows.ps1

This file was deleted.

60 changes: 59 additions & 1 deletion ci/gitlab_jenkins_templates/core_ci.jenkins
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,24 @@ def ubuntu_for_wheels_configs = [
]
]

// Configs for build from Windows server docker images
// (See: https://hub.docker.com/_/microsoft-dotnet-framework-sdk)
def windows_from_server_configs = [
// CUDA drivers on test machines only available for CUDA version >= 11.0
// see: https://gitlab-master.nvidia.com/ipp/cloud-infra/blossom/dev/windows-gpu-pods/-/tree/master/ContainerDriverSetup
// test machines currently are the only option, named 'gpu_tester'
// two machines exist, only the TITAN RTX will pass tests
[
'cudaVer': '11.1',
'pythonVer': '3.7', 'torchVer': '1.8.2',
'archsToTest': 'gpu_tester' //'Tesla_V100_PCIE_32GB'
],
[
'cudaVer': '11.3',
'pythonVer': '3.8', 'torchVer': '1.11.0',
'archsToTest': 'gpu_tester' //'Tesla_V100_PCIE_32GB'
]
]

dockerRegistryServer = 'gitlab-master.nvidia.com:5005'
dockerRegistryName = 'toronto_dl_lab/kaolin'
Expand Down Expand Up @@ -245,7 +263,7 @@ node {
configName,
baseImageTag,
config['archsToTest']
)
)
}

for (config in ubuntu_cpuonly_configs) {
Expand All @@ -258,6 +276,20 @@ node {
config['torchVer']
)
}

for (config in windows_from_server_configs) {
def cudaVerLabel = config['cudaVer'].split('\\.').join('')
def torchVerLabel = config['torchVer'].split('\\.')[0..1].join('')
def pythonVerLabel = config['pythonVer'].split('\\.').join('')
def configName = "windows-cuda${cudaVerLabel}-py${pythonVerLabel}-torch${torchVerLabel}"
jobMap["${configName}"] = prepareWindowsJob(
configName,
config['cudaVer'],
config['pythonVer'],
config['torchVer'],
config['archsToTest']
)
}
}
stage('Launch builds') {
parallel jobMap
Expand Down Expand Up @@ -352,3 +384,29 @@ def prepareUbuntuCPUOnlyJob(configName, pythonVer, torchVer) {
}
}
}

def prepareWindowsJob(configName, cudaVer, pythonVer, torchVer, archsToTest) {
return {
stage("${configName}") {
updateGitlabCommitStatus(name: "build-${configName}", state: "pending")
for (arch in archsToTest.split(';')) {
updateGitlabCommitStatus(name: "test-${configName}-${arch}", state: "pending")
}
build job: "windows_build_template_CI",
parameters: [
string(name: 'configName', value: "${configName}"),
string(name: 'cudaVer', value: "${cudaVer}"),
string(name: 'pythonVer', value: "${pythonVer}"),
string(name: 'torchVer', value: "${torchVer}"),
string(name: 'targetImageTag',
value: "${imageBaseTag}:${branchRef}-${BUILD_ID}-${configName}"),
string(name: 'sourceBranch', value: "${gitlabSourceBranch}"),
string(name: 'repoUrl', value: "${scm.userRemoteConfigs[0].url}" ),
string(name: 'commitHash', value: "${commitHash}"),
string(name: 'archsToTest', value: "${archsToTest}")
],
wait: false,
propagate: false
}
}
}
126 changes: 126 additions & 0 deletions ci/gitlab_jenkins_templates/windows_build_CI.jenkins
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
#!/usr/bin/env groovy

// Map from CUDA version to URL to obtain windows installer
def cuda_version_url = [
// CUDA drivers on test machines only available for CUDA version >= 11.0
// see: https://gitlab-master.nvidia.com/ipp/cloud-infra/blossom/dev/windows-gpu-pods/-/tree/master/ContainerDriverSetup
// test machines currently are the only option, named 'gpu_tester'
// two machines exist, only the TITAN RTX will pass tests
'11.1': 'http://developer.download.nvidia.com/compute/cuda/11.1.1/local_installers/cuda_11.1.1_456.81_win10.exe',
'11.3': 'https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.89_win10.exe',
]


docker_registry_server = targetImageTag.split(':')[0..1].join(':')
// This will be the "RUN" displayed on Blue Ocean
currentBuild.displayName = targetImageTag.split(':')[2]
// This will be the "MESSAGE" displayed on Blue Ocean
currentBuild.description = sourceBranch + ": " + commitHash

podTemplate(
cloud:'sc-ipp-blossom-prod',
envVars:[envVar(key:"JENKINS_URL", value:"${env.JENKINS_URL}")],
yaml:'''
apiVersion: v1
kind: Pod
spec:
containers:
- name: jnlp
image: jenkins/jnlp-agent:latest-windows
env:
- name: JENKINS_AGENT_WORKDIR
value: C:/Jenkins/agent
- name: DOCKER_HOST
value: "win-docker-proxy.blossom-system.svc.cluster.local"
- name: DOCKER_TLS_CERTDIR
value: ""
resources:
requests:
memory: 16Gi
limits:
memory: 16Gi
nodeSelector:
kubernetes.io/os: windows
''')
{
node(POD_LABEL) {
try {
gitlabCommitStatus("build-${configName}") {
timeout(time: 300, unit: 'MINUTES') {
stage("Checkout") {
checkout([
$class: 'GitSCM',
branches: [[name: "${commitHash}"]],
// We need submodules
extensions: [[
$class: 'SubmoduleOption',
disableSubmodules: false,
parentCredentials: false,
recursiveSubmodules: true,
reference: '',
trackingSubmodules: false
]],
userRemoteConfigs: [[
credentialsId: 'gitlab-credentials',
url: "${repoUrl}"
]]
])
}
docker.withRegistry("https://${docker_registry_server}", 'gitlab-credentials') {
stage("Build") {
cudaUrl = cuda_version_url[cudaVer]
targetImage = docker.build(
"${targetImageTag}",
"""-m 16g --no-cache -f ./tools/windows/Dockerfile \
--build-arg CUDA_VERSION=${cudaVer} \
--build-arg CUDA_URL=${cudaUrl} \
--build-arg PYTHON_VERSION=${pythonVer} \
--build-arg PYTORCH_VERSION=${torchVer} \
.
""")
powershell '''
docker images
'''
}
stage("Push") {
targetImage.push()
}
}
}
}
} catch (e) {
// In case of build failure, we need to update the following tests as we won't run them.
for (arch in archsToTest.split(';')) {
updateGitlabCommitStatus(name: "test-${configName}-${arch}", state: 'canceled')
}
throw e
}
stage("Launch tests") {
jobMap = [:]
for (arch in archsToTest.split(';')) {
jobMap["${arch}"] = prepareWindowsTestJob(arch)
}
parallel jobMap
}
}
}

def prepareWindowsTestJob(arch) {
return {
stage("Test ${arch}") {
build job: "windows_test_template_CI",
parameters: [
string(name: 'sourceBranch', value: "${sourceBranch}"),
string(name: 'configName', value: "${configName}"),
string(name: 'imageTag', value: "${targetImageTag}"),
string(name: 'arch', value: "${arch}"),
string(name: 'commitHash', value: "${commitHash}")
],
// This node doesn't need to be held while tests run.
wait: false,
// Success of this script depends only on successful build
// and launch of tests, not successful tests.
propagate: false
}
}
}

0 comments on commit 9085d14

Please sign in to comment.