Offline build

OGS can be built on systems without internet connection when the following files can be made available on the system:

  • The OGS source code. Just archive the full OGS source code directory (also containing the git repository in .git) and un-archive on the target system.
  • The CPM source cache. It can be obtained via the OGS package registry (see below).
  • Optional: The external dependencies (for MFront, PETSc or LIS) source cache. It can be obtained via the OGS package registry

CPM

The CPM source cache may change over time. To get the required file id check the package_file_id field in web/data/versions.json, e.g. with:

$ jq -r '.cpm.package_file_id' web/data/versions.json
1048 # <-- current version on master

Now simply download the file with:

curl https://gitlab.opengeosys.org/ogs/ogs/-/package_files/[insert ID here]/download --output cpm.tar.gz

Un-archive the CPM cache into a directory. Configure OGS as usual but point to the extracted CPM cache:

cmake --preset release -DCPM_SOURCE_CACHE=./path/to/cpm

There will be some CMake warnings from CPM regarding missing git repositories in the cache. You can ignore them.

External dependencies

The external dependencies source cache may change over time. To get the required version check the cache_hash field in web/data/versions.json, e.g. with:

$ jq -r '.ext.cache_hash' web/data/versions.json
5063f1593404ca5e61365e327a09cb3a1edcea1c # <-- current version on master

On the external dependencies package page download the file ext.tar.gz of the package external-dependencies with the specified version.

Extract the external dependencies cache into a directory. Configure OGS as usual but point to the extracted external dependencies cache:

cmake --preset release -DOGS_EXTERNAL_DEPENDENCIES_CACHE=./path/to/ext

Example for OpenGeoSys 6.4.3 (bugfix-branch)

On a machine with internet access download the tarballs:

wget https://gitlab.opengeosys.org/ogs/ogs/-/archive/v6.4.3/ogs-v6.4.3.tar.gz
wget -O cpm.tar.gz https://gitlab.opengeosys.org/ogs/ogs/-/package_files/193/download
wget -O ext.tar.gz https://gitlab.opengeosys.org/ogs/ogs/-/package_files/120/download

Copy those file onto the machine where you want to build OGS. Then build OGS offline:

tar xf ogs-v6.4.3.tar.gz
tar xf cpm.tar.gz
tar xf ext.tar.gz

cd ogs-v6.4.3
OGS_VERSION=6.4.3 cmake --preset release -DCPM_SOURCE_CACHE=../cpm -DOGS_EXTERNAL_DEPENDENCIES_CACHE=../ext
cmake --build --preset release

This article was written by Lars Bilke. If you are missing something or you find an error please let us know.
Generated with Hugo 0.122.0 in CI job 418530 | Last revision: February 1, 2024
Commit: [cmake] Set runtime parameter on larger benchmarks. 86f23e2  | Edit this page on