Commit 86443d72 authored by Dmitry Yu. Naumov's avatar Dmitry Yu. Naumov

Merge branch 'docker-publish' into 'master'

Publish Docker container

See merge request ogs/ogs!3271
parents 12bc35a5 b708b0e2
Subproject commit 4464d94a92d0738c26478a6292b26d6df1bb3567
Subproject commit b1c87d42549704b6b0bdba9efef2fc0a646e0e78
......@@ -8,11 +8,13 @@ container:
extends:
- .container-maker-setup
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- >
poetry run ogscm compiler.py ogs.py -B -C -R --ogs ../..
--build_args ' --progress=plain'
--pm system --cvode --ccache
--cmake_args ' -DBUILD_TESTING=OFF -DOGS_BUILD_UTILS=ON'
--tag $CI_REGISTRY/ogs/$CI_PROJECT_NAME/ogs-serial --upload
- >
poetry run ogscm compiler.py mpi.py ogs.py -B -C -R --ogs ../..
--build_args ' --progress=plain'
......
......@@ -88,6 +88,10 @@ if(IS_GIT_REPO AND NOT OGS_VERSION)
)
endif()
if(DEFINED OGS_VERSION)
message(STATUS "Using user-provided OGS_VERSION=${OGS_VERSION}")
endif()
if(MSVC)
set(CMD_COMMAND "cmd" "/c" CACHE INTERNAL "")
endif()
......@@ -81,3 +81,31 @@ Singularity ogs-6.2.2-serial.sif:...> exit
* `singularity exec --app ogs ogs-xxx-gui-xxx.sif DataExplorer`
You may use this container on e.g. `envinf1` with X11 forwarding (`ssh -XY envinf1`).
----
## With Docker
Although Singularity is the preferred container runtime you can use [Docker](https://www.docker.com) too.
### Prerequisites
* A running [installation of Docker](https://docs.docker.com/get-docker/)
### Run OGS inside a Docker container
* Get the container: `docker pull registry.opengeosys.org/ogs/ogs/ogs-serial`
* Start interactive container session: `docker run --rm -it registry.opengeosys.org/ogs/ogs/ogs-serial`
* Run ogs: `/scif/apps/ogs/bin/ogs --version`
* Exit the container: `exit`
You will notice that the interactive session in your container is isolated from your host, i.e. you do not have access to files on your host. You need to explicitly [mount](https://docs.docker.com/storage/bind-mounts/) them on `docker run`:
```bash
mkdir ~/ogs_out
docker run --rm -it -v $HOME/code/ogs6/ogs/Tests/Data:/tmp/data:ro -v $HOME/ogs_out:/tmp/out registry.opengeosys.org/ogs/ogs/ogs-seria
/scif/apps/ogs/bin/ogs -o /tmp/out /tmp/data/Elliptic/cube_1x1x1_SteadyStateDiffusion/cube_1e4.prj
exit
ls ~/ogs_out
# [shows ogs generated output files]
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment