Skip to content
Snippets Groups Projects
Commit ae9f10d3 authored by Jean-Baptiste Keck's avatar Jean-Baptiste Keck
Browse files

test with ci bat utility scripts on windows [ci skip]

parent 268eddef
No related branches found
No related tags found
1 merge request!40Add docker ubuntu 22.04 cuda 11.7 image
Pipeline #110409 skipped
pushd %~dp0
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%\..\.."
#!/usr/bin/env bash
##
## Copyright (C) HySoP 2011-2022
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
set -euf -o pipefail
DOCKER_IMAGE_TAG=${1:-jammy}
HYSOP_REGISTRY_URL='gricad-registry.univ-grenoble-alpes.fr'
docker logout
if [[ -z "${HYSOP_REGISTRY_USERNAME}" ]] || [[ -z "${HYSOP_REGISTRY_TOKEN}" ]]; then
docker login "${HYSOP_REGISTRY_URL}"
else
echo "${HYSOP_REGISTRY_TOKEN}" | docker login "${HYSOP_REGISTRY_URL}" --username "${HYSOP_REGISTRY_USERNAME}" --password-stdin
fi
docker pull "${HYSOP_REGISTRY_URL}/particle_methods/hysop:${DOCKER_IMAGE_TAG}"
docker logout
#!/usr/bin/env bash
##
## Copyright (C) HySoP 2011-2022
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
set -euf -o pipefail
DOCKER_IMAGE_TAG=${1:-jammy}
HYSOP_REGISTRY_URL='gricad-registry.univ-grenoble-alpes.fr'
docker logout
if [[ -z "${HYSOP_REGISTRY_USERNAME}" ]] || [[ -z "${HYSOP_REGISTRY_TOKEN}" ]]; then
docker login "${HYSOP_REGISTRY_URL}"
else
echo "${HYSOP_REGISTRY_TOKEN}" | docker login "${HYSOP_REGISTRY_URL}" --username "${HYSOP_REGISTRY_USERNAME}" --password-stdin
fi
docker push "${HYSOP_REGISTRY_URL}/particle_methods/hysop:${DOCKER_IMAGE_TAG}"
docker logout
SET DOCKER_IMAGE_TAG=%1:-jammy%
SET HYSOP_REGISTRY_URL='gricad-registry.univ-grenoble-alpes.fr'
IF [[ "%DOCKER_IMAGE_TAG%" == "*_cuda" "]]" (
SET EXTRA_ARGS=--gpus all
) ELSE (
SET EXTRA_ARGS=
)
docker "run" "--cap-add=SYS_PTRACE" "%EXTRA_ARGS%" "-it" "-v" "%SCRIPT_DIR%\..\%CD%.:\hysop:ro" "%HYSOP_REGISTRY_URL%\particle_methods\hysop:%DOCKER_IMAGE_TAG%"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment