Skip to content

ci: use own DPF standalone Docker image reference in workflows #3882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
May 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
faabd86
ci: use own DPF standalone Docker image reference in workflows
germa89 Apr 30, 2025
0dfcf8b
chore: adding changelog file 3882.maintenance.md [dependabot-skip]
pyansys-ci-bot Apr 30, 2025
62039f8
fix: enable DPF support in test workflow
germa89 Apr 30, 2025
1068dce
feat: add DPF log collection to remote log script and update DPF serv…
germa89 Apr 30, 2025
1ce29cf
fix: update vtk dependency version to 9.4.2 in tests and documentation
germa89 May 5, 2025
d59e270
fix: correct DPF_PORT type and update file upload method in test_dpf.py
germa89 May 5, 2025
5d0e3db
chore: adding changelog file 3882.dependencies.md [dependabot-skip]
pyansys-ci-bot May 5, 2025
ec1bd64
fix: update ansys-dpf-core dependency to include graphics support in …
germa89 May 5, 2025
82f2866
Merge branch 'ci/usind-dpf-standalone-in-cicd' of https://github.com/…
germa89 May 5, 2025
206c746
Merge branch 'main' into ci/usind-dpf-standalone-in-cicd
germa89 May 7, 2025
fdb93cf
chore: merge remote-tracking branch 'origin/main' into ci/usind-dpf-s…
germa89 May 8, 2025
1ba894b
fix: specify platform as linux/amd64 for all services in docker-compose
germa89 May 12, 2025
426ae9c
fix: update DPF Docker image tag to remove platform specification and…
germa89 May 13, 2025
4f22483
fix: add environment variable to accept DPF license agreement during …
germa89 May 13, 2025
4cf8f76
fix: comment out DPF port waiting logic in waiting_services.sh
germa89 May 13, 2025
dde14ce
fix: correct PID logging for MAPDL service launch and add environment…
germa89 May 13, 2025
1b3229b
fix: uncomment DPF port waiting logic in waiting_services.sh
germa89 May 13, 2025
6c5ddc0
Merge branch 'main' into ci/usind-dpf-standalone-in-cicd
germa89 May 13, 2025
72a873c
fix: correct DPF Docker image tag in documentation build workflow
germa89 May 13, 2025
d95b4cc
Merge branch 'ci/usind-dpf-standalone-in-cicd' of https://github.com/…
germa89 May 13, 2025
0283d69
fix: missing env var
germa89 May 13, 2025
0ece28a
cicd: empty commit to retrigger cicd
germa89 May 14, 2025
2ce1b91
fix: update DPF Docker image tag to use rocky variant in workflows
germa89 May 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ci/collect_mapdl_logs_remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ echo "Collecting local build logs..."

echo "Collecting docker run log..."
mv log.txt ./"$LOG_NAMES"/log.txt || echo "MAPDL run docker log not found."
mv log_dpf.txt ./"$LOG_NAMES"/log_dpf.txt || echo "DPF run docker log not found."

echo "Moving docker launch log..."
mv mapdl_launch_0.log ./"$LOG_NAMES"/mapdl_launch_0.log || echo "MAPDL launch docker log not found."
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
PYANSYS_OFF_SCREEN: True
BUILD_CHEATSHEET: '${{ inputs.build_cheatsheet }}'
MAPDL_IMAGE_VERSION_DOCS_BUILD: v24.2-ubuntu-student
DPF_DOCKER_IMAGE: ghcr.io/ansys/mapdl:v25.2-rocky-dpf-standalone
MAPDL_PACKAGE: ghcr.io/ansys/mapdl
PYMAPDL_START_INSTANCE: FALSE
PYMAPDL_PORT: 21000 # default won't work on GitHub runners
Expand Down Expand Up @@ -110,7 +111,7 @@ jobs:
- name: "DPF server activation"
shell: bash
run: |
$(docker pull ghcr.io/ansys/dpf-core:22.2dev && docker run -d --name dpfserver -p ${{ env.DPF_PORT }}:50052 ghcr.io/ansys/dpf-core:22.2dev && echo "DPF Server active on port ${{ env.DPF_PORT }}.") &
$(docker pull $DPF_DOCKER_IMAGE && docker run -d --name dpfserver --env ANSYS_DPF_ACCEPT_LA=Y -p ${{ env.DPF_PORT }}:50052 $DPF_DOCKER_IMAGE && echo "DPF Server active on port ${{ env.DPF_PORT }}.") &

- name: "Getting files change filters"
uses: dorny/paths-filter@v3
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test-remote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ jobs:
PYMAPDL_PORT2: 21001 # for the pool testing and default won't work on GitHub runners
PYMAPDL_DB_PORT: 21002 # default won't work on GitHub runners
PYMAPDL_DB_PORT2: 21003 # default won't work on GitHub runners
DPF_DOCKER_IMAGE: ghcr.io/ansys/mapdl:v25.2-rocky-dpf-standalone
DPF_PORT: 21004
DPF_START_SERVER: False
HAS_DPF: True
PYTEST_ARGUMENTS: '-vvv -rxXsa --color=yes --durations=30 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html --timeout=180 --profile-svg --profile --report-log-exclude-logs-on-passed-tests'
MAPDL_PACKAGE: ghcr.io/ansys/mapdl

Expand Down Expand Up @@ -142,14 +144,16 @@ jobs:
export INSTANCE_NAME=MAPDL_1
.ci/start_mapdl.sh &> mapdl_launch_1.log & export DOCKER_PID_1=$!
echo "Launching MAPDL service 0 at PID: $DOCKER_PID_0"
echo "Launching MAPDL service 1 at PID: $DOCKER_PID_2"
echo "Launching MAPDL service 1 at PID: $DOCKER_PID_1"
echo "DOCKER_PID_0=$(echo $DOCKER_PID_0)" >> $GITHUB_OUTPUT
echo "DOCKER_PID_1=$(echo $DOCKER_PID_1)" >> $GITHUB_OUTPUT

- name: "DPF server activation"
shell: bash
env:
ANSYS_DPF_ACCEPT_LA: Y
run: |
$(docker pull ghcr.io/ansys/dpf-core:22.2dev && docker run -d --name dpfserver -p ${{ env.DPF_PORT }}:50052 ghcr.io/ansys/dpf-core:22.2dev && echo "DPF Server active on port ${{ env.DPF_PORT }}.") &
docker pull $DPF_DOCKER_IMAGE && docker run -d --name dpfserver --env ANSYS_DPF_ACCEPT_LA=Y -p ${{ env.DPF_PORT }}:50052 $DPF_DOCKER_IMAGE && echo "DPF Server active on port ${{ env.DPF_PORT }}." > log_dpf.txt &

- name: "Getting files change filters"
uses: dorny/paths-filter@v3
Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/3882.dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ci: use own DPF standalone Docker image reference in workflows
3 changes: 3 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ services:
- '50052:50052'
- '50055:50055'
image: ${DOCKER_IMAGE}
platform: linux/amd64
entrypoint: "/bin/bash ansys -grpc"

dpf:
Expand All @@ -105,6 +106,7 @@ services:
- mapdl-dpf
- local-dpf
image: ${DPF_DOCKER_IMAGE}
platform: linux/amd64
ports:
- '50056:50052'
restart: always
Expand All @@ -128,6 +130,7 @@ services:
ports:
- '50052:50052'
- '50055:50055'
platform: linux/amd64
image: ${DOCKER_IMAGE}
# Mount the current directory to /home/${DOCKER_USER:-mapdl}/pymapdl
# This allows you to run the container and have access to the current directory
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ all = [
]

tests = [
"ansys-dpf-core==0.13.6",
"ansys-dpf-core[graphics]==0.13.6",
"ansys-tools-visualization-interface==0.9.1",
"autopep8==2.3.2",
"matplotlib==3.10.3",
Expand All @@ -86,7 +86,7 @@ tests = [
]

doc = [
"ansys-dpf-core==0.13.6",
"ansys-dpf-core[graphics]==0.13.6",
"ansys-mapdl-reader==0.55.0",
"ansys-sphinx-theme==1.4.4",
"ansys-tools-visualization-interface==0.9.1",
Expand Down
6 changes: 3 additions & 3 deletions tests/test_dpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from ansys.dpf import core as dpf
from ansys.dpf.core.server_types import DPF_DEFAULT_PORT

DPF_PORT = os.environ.get("DPF_PORT", DPF_DEFAULT_PORT) # Set in ci.yaml
DPF_PORT = int(os.environ.get("DPF_PORT", DPF_DEFAULT_PORT)) # Set in ci.yaml


@pytest.fixture()
Expand All @@ -46,7 +46,7 @@ def dpf_server():
# Start the DPF server
if ON_LOCAL:
# If running locally, start the server
dpf_server = dpf.start_local_server(port=int(DPF_PORT))
dpf_server = dpf.start_local_server(port=DPF_PORT)
assert not dpf_server.info["server_ip"]

else:
Expand All @@ -64,7 +64,7 @@ def model(dpf_server, mapdl, solved_box, tmpdir):

# Upload RST
if not dpf_server.local_server:
rst_path = dpf.upload_file_in_tmp_folder(rst_path)
rst_path = dpf.upload_file_in_tmp_folder(rst_path, server=dpf_server)

model = dpf.Model(rst_path)
assert model.results is not None
Expand Down