From c35b8a12b25ea0b2442ef28a4663018e60ea4a0f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Keck <jean-baptiste.keck@univ-grenoble-alpes.fr> Date: Sat, 24 Sep 2022 17:58:17 +0200 Subject: [PATCH] fix bat scripts [ci skip] --- ci/docker_images/ubuntu/jammy_cuda/Dockerfile | 4 ---- ci/utils/build_docker_image.bat | 10 +++++----- ci/utils/pull_docker_image.bat | 7 +++---- ci/utils/run_docker_image.bat | 6 +++--- 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/ci/docker_images/ubuntu/jammy_cuda/Dockerfile b/ci/docker_images/ubuntu/jammy_cuda/Dockerfile index 10f34b57f..2ee796fd1 100644 --- a/ci/docker_images/ubuntu/jammy_cuda/Dockerfile +++ b/ci/docker_images/ubuntu/jammy_cuda/Dockerfile @@ -224,10 +224,6 @@ RUN ${PYTHON_EXECUTABLE} -m pip install ansicolors --ignore-installed RUN ${PYTHON_EXECUTABLE} -m pip install numpy==1.21.5 RUN ${PYTHON_EXECUTABLE} -m pip install sympy==1.10.0 -# windows is missing libnvidia-opencl.so so we copy it from there -RUN cd /lib/x86_64-linux-gnu \ - && wget https://cloud.univ-grenoble-alpes.fr/s/HHoMSeTgHgZ3x7H/download/libnvidia-opencl.so.1 - # ensure all libraries are known by the runtime linker RUN ldconfig diff --git a/ci/utils/build_docker_image.bat b/ci/utils/build_docker_image.bat index d0dce81d1..f37cb364f 100755 --- a/ci/utils/build_docker_image.bat +++ b/ci/utils/build_docker_image.bat @@ -1,7 +1,7 @@ pushd %~dp0 -set SCRIPT_DIR=%CD% +set "SCRIPT_DIR=%CD%" popd -set NTHREADS=%NUMBER_OF_PROCESSORS% -set HYSOP_REGISTRY_URL='gricad-registry.univ-grenoble-alpes.fr' -if "%~1" NEQ "" set DOCKER_IMAGE_TAG="%~1" else set DOCKER_IMAGE_TAG="jammy" -docker "build" "--rm=true" "--build-arg" "NTHREADS=%NTHREADS%" "-t" "%HYSOP_REGISTRY_URL%\particle_methods\hysop:%DOCKER_IMAGE_TAG%" "-f" "%SCRIPT_DIR%\..\docker_images\ubuntu\%DOCKER_IMAGE_TAG%\Dockerfile" "%SCRIPT_DIR%\..\.." +set "NTHREADS=%NUMBER_OF_PROCESSORS%" +set "HYSOP_REGISTRY_URL=gricad-registry.univ-grenoble-alpes.fr" +if "%~1" NEQ "" (set "DOCKER_IMAGE_TAG=%~1") else (set "DOCKER_IMAGE_TAG=jammy") +docker build --rm=true --build-arg "NTHREADS=%NTHREADS%" -t "%HYSOP_REGISTRY_URL%/particle_methods/hysop:%DOCKER_IMAGE_TAG%" -f "%SCRIPT_DIR%\..\docker_images\ubuntu\%DOCKER_IMAGE_TAG%\Dockerfile" "%SCRIPT_DIR%\..\.." diff --git a/ci/utils/pull_docker_image.bat b/ci/utils/pull_docker_image.bat index e95513ede..280c1416e 100755 --- a/ci/utils/pull_docker_image.bat +++ b/ci/utils/pull_docker_image.bat @@ -1,11 +1,10 @@ pushd %~dp0 -set SCRIPT_DIR=%CD% +set "SCRIPT_DIR=%CD%" popd -set NTHREADS=%NUMBER_OF_PROCESSORS% -set HYSOP_REGISTRY_URL=gricad-registry.univ-grenoble-alpes.fr +set "HYSOP_REGISTRY_URL=gricad-registry.univ-grenoble-alpes.fr" -if "%~1" NEQ "" (set DOCKER_IMAGE_TAG=%~1) else (set DOCKER_IMAGE_TAG=jammy) +if "%~1" NEQ "" (set "DOCKER_IMAGE_TAG=%~1") else (set "DOCKER_IMAGE_TAG=jammy") docker logout docker login "%HYSOP_REGISTRY_URL%" diff --git a/ci/utils/run_docker_image.bat b/ci/utils/run_docker_image.bat index 24200c767..fc1e8eb37 100755 --- a/ci/utils/run_docker_image.bat +++ b/ci/utils/run_docker_image.bat @@ -1,8 +1,8 @@ pushd %~dp0 -set SCRIPT_DIR=%CD% +set "SCRIPT_DIR=%CD%" popd -set HYSOP_REGISTRY_URL=gricad-registry.univ-grenoble-alpes.fr -if "%~1" NEQ "" (set DOCKER_IMAGE_TAG=%~1) else (set DOCKER_IMAGE_TAG=jammy) +set "HYSOP_REGISTRY_URL=gricad-registry.univ-grenoble-alpes.fr" +if "%~1" NEQ "" (set "DOCKER_IMAGE_TAG=%~1") else (set "DOCKER_IMAGE_TAG=jammy") set "DOCKER_IMAGE_TAG_POSTFIX=%DOCKER_IMAGE_TAG:~-4%" if "%DOCKER_IMAGE_TAG_POSTFIX%" == "cuda" (set "EXTRA_ARGS=--gpus all") else (set "EXTRA_ARGS=") docker run %EXTRA_ARGS% -it -v "%SCRIPT_DIR%\..\..:/hysop:ro" "%HYSOP_REGISTRY_URL%/particle_methods/hysop:%DOCKER_IMAGE_TAG%" -- GitLab