forked from cta-wave/dpctf-deploy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanalyse-recording.bat
38 lines (30 loc) · 1.17 KB
/
analyse-recording.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@echo off
setlocal enabledelayedexpansion
for /f "tokens=*" %%i in ('docker images -q dpctf-dof:latest 2^>nul') do set image=%%i
if not defined image (
echo DOF image not found! Please build it using:
echo .\build-dof.bat
exit /b 1
)
if "%~1" == "" (
echo No video recording provided!
echo analyse-recordings.bat ^<video-file^>
exit /b 1
)
set "absolute_path=%~f1"
set "dirname=%~dp1"
set "filename=%~nx1"
set "observation_ini=%~dp0observation-config.ini"
set "config_dir=%~dp0configuration"
set "args="
if exist "%observation_ini%" set "args=%args% -v "%observation_ini%":/usr/app/device-observation-framework/config.ini"
if exist "%config_dir%" set "args=%args% -v "%config_dir%":/usr/app/device-observation-framework/configuration"
set "start_args="
set count=0
for %%a in (%*) do (
set /a count+=1
if NOT !count! == 1 (
set start_args=!start_args! %%a
)
)
docker run -it --rm --network "host" -v %dirname%:/usr/app/recordings -v %~dp0observation_logs:/usr/app/device-observation-framework/logs -v %~dp0observation_results:/usr/app/device-observation-framework/results -e RECORDING_FILENAME=%filename% %args% dpctf-dof:v2.0.0 %start_args%