ansys / ansys/pyfluent

Develop a lite version of Fluent docker image to use in PyFluent

Open
#5,363 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
497
Forks
77
Avg merge
22h 37m
Merged PRs (30d)
45

Description

**Motivation**

We sometimes face timeout issues while pulling the official Fluent image from ghcr.io locally or in CI runners due to its large size. We use the image to run PyFluent codegen, unittests and doc examples which do not need all components included in the official image. We can seek to develop a lite version of the Fluent image tailored for PyFluent usage.

**Work done so far**

A lite version of the image is generated and tested locally using this [Dockerfile](https://github.com/ansys/pyfluent/blob/feat/docker-dev/docker_dev/Dockerfile). Below are the relative sizes:
```
IMAGE ID DISK USAGE CONTENT SIZE
ghcr.io/ansys/fluent:v27.1.latest fabb00aa5c3f 41.6GB 10.9GB
ghcr.io/ansys/fluent:v27.1.lite a823b8a4ba93 16.1GB 4.16GB
```
We got ~92% of the PR unittests passing locally. Some failures are unrelated as they seem to be passing after a re-run.

**Future work**

1. The above Dockerfile is built using a subtractive approach by removing unneeded files/folders from the official image as I locally didn't have access to the package files used to build the official image. We can take a cleaner approach by including the files/folders that are just needed to build the lite image.
2. Verify codegen, the full unittest suite and doc examples with the lite image.
3. **Note about geometry/mesh file import**: It is best if we can use a native file-format in the `ImportGeometry` step of meshing workflows that will not require any external import tool. The .fmd format is natively read in Fluent meshing and is currently supported in FTM workflows. At the time of writing, .fmd support is beta in WTM workflows, so hopefully it will also be there in the future. We can explore if the .fmd format is sufficient for PyFluent unittests and doc examples so we can get rid of the external import tools from the lite image. The above Dockerfile actually excludes all external import tools and only supports the .fmd format (which is the cause of some observed test failures).

Contributor guide

Open the contributing guide

Research direction

Start with docker_dev/Dockerfile and build the proposed lite image to understand the current subtractive approach. Then run codegen, the full unittest suite, and documentation examples against it, checking the noted .fmd-only geometry and mesh workflows. Done means a maintainable lite image with the required PyFluent workflows verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
devops, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.