Skip to content
Snippets Groups Projects
Unverified Commit 70ec5f6a authored by Lars Bilke's avatar Lars Bilke
Browse files

Build container with Python 3.10.

parent b9598efe
No related branches found
No related tags found
1 merge request!153Minimal version is now Python 3.10
Pipeline #23482 failed
FROM mcr.microsoft.com/devcontainers/python:3.9-bookworm
FROM mcr.microsoft.com/devcontainers/python:3.10-bookworm
# FEFLOW, instructions from https://download.feflow.com/download/FEFLOW/linux/
ENV \
......
......@@ -5,8 +5,8 @@ stages:
variables:
POETRY_CACHE_DIR: "$CI_PROJECT_DIR/.cache"
DOCKER_IMAGE: registry.opengeosys.org/ogs/tools/ogstools/devcontainer-3.9
DOCKER_USER_IMAGE: registry.opengeosys.org/ogs/tools/ogstools/main-3.9
DOCKER_IMAGE: registry.opengeosys.org/ogs/tools/ogstools/devcontainer-3.10
DOCKER_USER_IMAGE: registry.opengeosys.org/ogs/tools/ogstools/main-3.10
workflow:
rules:
......@@ -14,7 +14,7 @@ workflow:
changes:
- Dockerfile
variables:
DOCKER_IMAGE: $CI_REGISTRY_IMAGE/devcontainer-3.9:$CI_COMMIT_REF_SLUG
DOCKER_IMAGE: $CI_REGISTRY_IMAGE/devcontainer-3.10:$CI_COMMIT_REF_SLUG
- if: $CI_MERGE_REQUEST_IID
- if: $CI_COMMIT_TAG
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_PATH == "ogs/tools/ogstools"'
......@@ -165,7 +165,7 @@ user container image:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_TAG
variables:
DOCKER_USER_IMAGE: registry.opengeosys.org/ogs/tools/ogstools/main-3.9:$CI_COMMIT_TAG
DOCKER_USER_IMAGE: registry.opengeosys.org/ogs/tools/ogstools/main-3.10:$CI_COMMIT_TAG
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $DOCKER_USER_IMAGE .
......
FROM registry.opengeosys.org/ogs/tools/ogstools/devcontainer-3.9
FROM registry.opengeosys.org/ogs/tools/ogstools/devcontainer-3.10
RUN --mount=target=/ogstools,type=bind,source=.,readwrite \
pip install /ogstools[feflow] \
......
......@@ -185,7 +185,7 @@ Now you are inside the container. For example, you can open a new terminal (`Ter
If you are familiar with [Docker](https://www.docker.com), you can also start the container manually, e.g. with:
```bash
docker run --rm -it -v $PWD:$PWD -w $PWD registry.opengeosys.org/ogs/tools/ogstools/devcontainer-3.9 /bin/bash
docker run --rm -it -v $PWD:$PWD -w $PWD registry.opengeosys.org/ogs/tools/ogstools/devcontainer-3.10 /bin/bash
# Inside the container:
make setup_devcontainer
pytest
......@@ -198,7 +198,7 @@ ______________________________________________________________________
To prevent these issues we recommend running via [Apptainer](https://apptainer.org):
```bash
apptainer shell docker://registry.opengeosys.org/ogs/tools/ogstools/devcontainer-3.9
apptainer shell docker://registry.opengeosys.org/ogs/tools/ogstools/devcontainer-3.10
# Inside the container:
make setup_devcontainer
pytest
......
......@@ -13,7 +13,7 @@ A prebuilt [Docker](https://www.docker.com) image with the latest (nightly build
:sync: unix
```bash
docker run --rm -it -v $PWD:$PWD -w $PWD registry.opengeosys.org/ogs/tools/ogstools/main-3.9:feflow-8.0
docker run --rm -it -v $PWD:$PWD -w $PWD registry.opengeosys.org/ogs/tools/ogstools/main-3.10
# Now in the container:
ogs --version
# test if feflow2ogs is available:
......@@ -31,7 +31,7 @@ import ogstools.meshplotlib as mpl
This command works only in the powershell.
```powershell
docker run --rm -it -v ${PWD}:/working_dir -w /working_dir registry.opengeosys.org/ogs/tools/ogstools/main-3.9:feflow-8.0
docker run --rm -it -v ${PWD}:/working_dir -w /working_dir registry.opengeosys.org/ogs/tools/ogstools/main-3.10
# Now in the container:
ogs --version
# test if feflow2ogs is available:
......@@ -70,7 +70,7 @@ ______________________________________________________________________
The prebuilt Docker image can also be run with [Apptainer](https://apptainer.org) (formerly known as *Singularity*):
```bash
apptainer shell docker://registry.opengeosys.org/ogs/tools/ogstools/main-3.9
apptainer shell docker://registry.opengeosys.org/ogs/tools/ogstools/main-10
```
The above command will open a shell in the container. Your home-directory is automatically mounted and you are the same user as outside the container. There will be no file permission issues as with Docker.
......@@ -24,14 +24,14 @@ This means that the converter supplies a suggestion for a `prj-file`, which is n
to be working.
The current status enables:
### Main features:
### Main features
- conversion of FEFLOW meshes
- extraction of boundary condition
- creation of OGS-models for `steady state diffusion`, `liquid flow`, `hydro thermal` and `component transport` processes
- usage via *command line interface* or as *Python library*
### specific features:
### specific features
- get point, cells and celltypes to array according to pyvista convention for [pyvista.UnstructuredGrid](https://docs.pyvista.org/version/stable/api/core/_autosummary/pyvista.UnstructuredGrid.html)
- write MaterialIDs to a dictionary
......@@ -90,7 +90,7 @@ The converter requires FEFLOW to be installed.
There are different ways to fulfill this requirement, either one installs FEFLOW or works with a [Docker container](./docker.md) that has FEFLOW installed.
::::{note}
If you use an old version of FEFLOW, make sure it is compatible with `Python 3.9`, as this is a requirement for using of ogstools and the FEFLOW-converter.
If you use an old version of FEFLOW, make sure it is compatible with `Python 3.10`, as this is a requirement for using of ogstools and the FEFLOW-converter.
::::
::::{tab-set}
......
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