-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
07c359d
commit a3bab47
Showing
22 changed files
with
241 additions
and
51 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
.DEFAULT_GOAL := help | ||
|
||
help: ## print this message | ||
@echo "Example operations by makefile." | ||
@echo "" | ||
@echo "Usage: make SUB_COMMAND argument_name=argument_value" | ||
@echo "" | ||
@echo "Command list:" | ||
@echo "" | ||
@printf "\033[36m%-40s\033[0m %-50s %s\n" "[Sub command]" "[Description]" "[Example]" | ||
@grep -E '^[/a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | perl -pe 's%^([/a-zA-Z0-9_-]+):.*?(##)%$$1 $$2%' | awk -F " *?## *?" '{printf "\033[36m%-40s\033[0m %-50s %s\n", $$1, $$2, $$3}' | ||
|
||
run-build-centos7-cpu-x64-desktop: ## run build container for centos7 cpu x64 on desktop | ||
@pwsh RunBuildContainer.ps1 cpu 64 desktop centos 7 "/x64" | ||
|
||
run-build-centos7-mkl-x64-desktop: ## run build container for centos7 mkl x64 on desktop | ||
@pwsh RunBuildContainer.ps1 mkl 64 desktop centos 7 "/x64" | ||
|
||
run-build-ubuntu16-cpu-x64-desktop: ## run build container for ubuntu16 cpu x64 on desktop | ||
@pwsh RunBuildContainer.ps1 cpu 64 desktop ubuntu 16 "/x64" | ||
|
||
run-build-ubuntu16-mkl-x64-desktop: ## run build container for ubuntu16 mkl x64 on desktop | ||
@pwsh RunBuildContainer.ps1 mkl 64 desktop ubuntu 16 "/x64" | ||
|
||
run-test-centos7-cpu-x64-desktop: ## run build container for centos7 cpu x64 on desktop | ||
@pwsh RunTestContainer.ps1 cpu 64 desktop centos 7 "/x64" | ||
|
||
run-test-centos7-mkl-x64-desktop: ## run build container for centos7 mkl x64 on desktop | ||
@pwsh RunTestContainer.ps1 mkl 64 desktop centos 7 "/x64" | ||
|
||
run-test-centos7-cu92-x64-desktop: ## run build container for centos7 cuda-92 x64 on desktop | ||
@pwsh RunTestContainer.ps1 cuda 64 desktop centos 7 "92" | ||
|
||
run-test-centos7-cu100-x64-desktop: ## run build container for centos7 cuda-100 x64 on desktop | ||
@pwsh RunTestContainer.ps1 cuda 64 desktop centos 7 "100" | ||
|
||
run-test-centos7-cu101-x64-desktop: ## run build container for centos7 cuda-101 x64 on desktop | ||
@pwsh RunTestContainer.ps1 cuda 64 desktop centos 7 "101" | ||
|
||
run-test-centos7-cu102-x64-desktop: ## run build container for centos7 cuda-102 x64 on desktop | ||
@pwsh RunTestContainer.ps1 cuda 64 desktop centos 7 "102" | ||
|
||
run-test-centos7-cu110-x64-desktop: ## run build container for centos7 cuda-110 x64 on desktop | ||
@pwsh RunTestContainer.ps1 cuda 64 desktop centos 7 "110" | ||
|
||
run-test-centos7-cu111-x64-desktop: ## run build container for centos7 cuda-111 x64 on desktop | ||
@pwsh RunTestContainer.ps1 cuda 64 desktop centos 7 "111" | ||
|
||
run-test-centos7-cu112-x64-desktop: ## run build container for centos7 cuda-112 x64 on desktop | ||
@pwsh RunTestContainer.ps1 cuda 64 desktop centos 7 "112" | ||
|
||
run-test-centos7-cpu-x64-desktop: ## run build container for centos7 cpu x64 on desktop | ||
@pwsh RunTestContainer.ps1 cpu 64 desktop ubuntu 16 "/x64" | ||
|
||
run-test-ubuntu16-mkl-x64-desktop: ## run build container for ubuntu16 mkl x64 on desktop | ||
@pwsh RunTestContainer.ps1 mkl 64 desktop ubuntu 16 "/x64" | ||
|
||
run-test-ubuntu16-cu92-x64-desktop: ## run build container for ubuntu16 cuda-92 x64 on desktop | ||
@pwsh RunTestContainer.ps1 cuda 64 desktop ubuntu 16 "92" | ||
|
||
run-test-ubuntu16-cu100-x64-desktop: ## run build container for ubuntu16 cuda-100 x64 on desktop | ||
@pwsh RunTestContainer.ps1 cuda 64 desktop ubuntu 16 "100" | ||
|
||
run-test-ubuntu16-cu101-x64-desktop: ## run build container for ubuntu16 cuda-101 x64 on desktop | ||
@pwsh RunTestContainer.ps1 cuda 64 desktop ubuntu 16 "101" | ||
|
||
run-test-ubuntu16-cu102-x64-desktop: ## run build container for ubuntu16 cuda-102 x64 on desktop | ||
@pwsh RunTestContainer.ps1 cuda 64 desktop ubuntu 16 "102" | ||
|
||
run-test-ubuntu16-cu110-x64-desktop: ## run build container for ubuntu16 cuda-110 x64 on desktop | ||
@pwsh RunTestContainer.ps1 cuda 64 desktop ubuntu 16 "110" | ||
|
||
run-test-ubuntu16-cu111-x64-desktop: ## run build container for ubuntu16 cuda-111 x64 on desktop | ||
@pwsh RunTestContainer.ps1 cuda 64 desktop ubuntu 16 "111" | ||
|
||
run-test-ubuntu16-cu112-x64-desktop: ## run build container for ubuntu16 cuda-112 x64 on desktop | ||
@pwsh RunTestContainer.ps1 cuda 64 desktop ubuntu 16 "112" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
#*************************************** | ||
#Arguments | ||
#%1: Target (cpu/cuda/mkl/arm) | ||
#%2: Architecture (32/64) | ||
#%3: Platform (desktop,android/ios/uwp) | ||
#%4: Optional Argument | ||
# if Target is cuda, CUDA version if Target is cuda [90/91/92/100/101/102/110/111] | ||
# if Target is mkl and Windows, IntelMKL directory path | ||
#*************************************** | ||
Param | ||
( | ||
[Parameter( | ||
Mandatory=$True, | ||
Position = 1 | ||
)][string] | ||
$Target, | ||
|
||
[Parameter( | ||
Mandatory=$True, | ||
Position = 2 | ||
)][int] | ||
$Architecture, | ||
|
||
[Parameter( | ||
Mandatory=$True, | ||
Position = 3 | ||
)][string] | ||
$Platform, | ||
|
||
[Parameter( | ||
Mandatory=$True, | ||
Position = 4 | ||
)][string] | ||
$Distribution, | ||
|
||
[Parameter( | ||
Mandatory=$True, | ||
Position = 5 | ||
)][string] | ||
$DistributionVersion, | ||
|
||
[Parameter( | ||
Mandatory=$False, | ||
Position = 6 | ||
)][string] | ||
$Option | ||
) | ||
|
||
$ScriptPath = $PSScriptRoot | ||
$FaceRecognitionDotNetRoot = Split-Path $ScriptPath -Parent | ||
$BuildUtilsPath = Join-Path $FaceRecognitionDotNetRoot "nuget" | ` | ||
Join-Path -ChildPath "BuildUtils.ps1" | ||
import-module $BuildUtilsPath -function * | ||
$Config = [Config]::new($FaceRecognitionDotNetRoot, "Release", $Target, $Architecture, $Platform, $Option) | ||
|
||
$DataSetRoot = $env:DataSetDir | ||
if (!(Test-Path($DataSetRoot))) | ||
{ | ||
Write-Host "${DataSetRoot} is missing. You can specify DataSetDir environmental variable" -ForegroundColor Yellow | ||
$DataSetRoot = $FaceRecognitionDotNetRoot | ||
} | ||
|
||
if ($Target -ne "cuda") | ||
{ | ||
$postfix = $Option | ||
$cuda = 0 | ||
$dockername = "facerecognition/test/$Distribution/$DistributionVersion/$Target" + $postfix | ||
} | ||
else | ||
{ | ||
$cudaVersion = ($Option / 10).ToString("0.0") | ||
$cuda = 1 | ||
$dockername = "facerecognition/test/$Distribution/$DistributionVersion/$Target/$cudaVersion" | ||
} | ||
|
||
if ($cuda -ne 0) | ||
{ | ||
$dockerAPIVersion = docker version --format '{{.Server.APIVersion}}' | ||
Write-Host "Docker API Version: $dockerAPIVersion" -ForegroundColor Yellow | ||
if ($dockerAPIVersion -ge 1.40) | ||
{ | ||
docker run --gpus all --rm ` | ||
--entrypoint="/bin/bash" ` | ||
-v "$($FaceRecognitionDotNetRoot):/opt/data/FaceRecognitionDotNet" ` | ||
-v "$($DataSetRoot):/opt/data/Dataset" ` | ||
-e "LOCAL_UID=$(id -u $env:USER)" ` | ||
-e "LOCAL_GID=$(id -g $env:USER)" ` | ||
-w /opt/data/FaceRecognitionDotNet ` | ||
-it "$dockername" | ||
} | ||
else | ||
{ | ||
docker run --runtime=nvidia --rm ` | ||
--entrypoint="/bin/bash" ` | ||
-v "$($FaceRecognitionDotNetRoot):/opt/data/FaceRecognitionDotNet" ` | ||
-v "$($DataSetRoot):/opt/data/Dataset" ` | ||
-e "LOCAL_UID=$(id -u $env:USER)" ` | ||
-e "LOCAL_GID=$(id -g $env:USER)" ` | ||
-w /opt/data/FaceRecognitionDotNet ` | ||
-it "$dockername" | ||
} | ||
} | ||
else | ||
{ | ||
docker run --rm ` | ||
--entrypoint="/bin/bash" ` | ||
-v "$($FaceRecognitionDotNetRoot):/opt/data/FaceRecognitionDotNet" ` | ||
-v "$($DataSetRoot):/opt/data/Dataset" ` | ||
-e "LOCAL_UID=$(id -u $env:USER)" ` | ||
-e "LOCAL_GID=$(id -g $env:USER)" ` | ||
-w /opt/data/FaceRecognitionDotNet ` | ||
-it "$dockername" | ||
} |
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
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
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
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
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
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
Oops, something went wrong.