Skip to content

Commit

Permalink
add windows docker/wsl script
Browse files Browse the repository at this point in the history
  • Loading branch information
yannrichet authored Sep 20, 2023
1 parent 0a82633 commit f4e4675
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/main/scripts/Telemac-docker.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@echo on

CAS=%1%

NCPU=%NUMBER_OF_PROCESSORS%

rem assume proxy is ok (export https_proxy="http://login:passwd@proxy-ip:port"), or docker pull irsn/telemac-mascaret was already done.
wsl -u root -e bash -c "docker run -v `echo $PWD`:/workdir irsn/telemac-mascaret:latest telemac2d.py --ncsize=%NCPU% %CAS%"

for /F "TOKENS=1,2,*" %%a in ('tasklist /FI "IMAGENAME eq wsl.exe"') do set PID_WSL=%%b
echo %PID_WSL% > PID

:loop
tasklist | find " %PID_WSL% " >nul
if not errorlevel 1 (
timeout /t 1 >nul
goto :loop
)

del /f PID

0 comments on commit f4e4675

Please sign in to comment.