Skip to content

Commit e8170db

Browse files
Merge branch 'main' into feat/pygeometry-connection
2 parents 04c2cdb + 950690e commit e8170db

File tree

93 files changed

+273
-87
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+273
-87
lines changed

.github/workflows/ci_cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515

1616
env:
1717
DOCKER_IMAGE_NAME: ghcr.io/ansys/prime
18-
DOCKER_IMAGE_TAG: '25.1.0.dev20'
18+
DOCKER_IMAGE_TAG: '25.1.0'
1919
MAIN_PYTHON_VERSION: '3.12'
2020
PACKAGE_NAME: 'ansys-meshing-prime'
2121
PACKAGE_NAMESPACE: 'ansys.meshing.prime'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updated Docker image
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build(deps): bump ansys-tools-visualization-interface from 0.6.0 to 0.6.2 in the general-dependencies group

doc/changelog.d/961.test.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build(deps): bump the doc-dependencies group across 1 directory with 2 updates
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build(deps): bump ansys-tools-visualization-interface from 0.6.2 to 0.7.0 in the general-dependencies group
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build(deps): bump ansys-sphinx-theme[autoapi] from 1.2.4 to 1.2.6 in the doc-dependencies group

doc/changelog.d/964.maintenance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version update to 0.7.0

doc/source/getting_started/index.rst

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,167 @@ To launch PyPrimeMesh, use this code:
9393
with prime.launch_prime() as prime_client:
9494
model = prime_client.model
9595
96+
Launching PyPrimeMesh through docker
97+
------------------------------------
98+
99+
Ansys Prime Server is capable of being launched through docker.
100+
Docker is an open platform for developing, shipping, and running apps in a containerized way.
101+
Containers are standard units of software that package the code and all its dependencies.
102+
Hence, the app runs quickly and reliably from one computing environment to another.
103+
104+
Ansys Prime Server can be built as a Linux Docker container.
105+
Hence, you should have a linux machine to run the Ansys Prime Server.
106+
107+
Docker for Linux containers
108+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
109+
To run the Linux Docker container for the Ansys Prime Server,
110+
ensure that you follow these steps when installing the Docker:
111+
112+
1. Install `Docker Engine <https://docs.docker.com/engine/install/rhel/>`_.
113+
114+
2. Restart your machine and start Docker Engine after completing the installation.
115+
116+
Your Docker engine supports running Linux Docker containers, you can build or install the Ansys Prime Server image.
117+
118+
.. note::
119+
Ansys Prime Server uses Intel MPI library for performing meshing operations. Intel MPI library requires NUMA support.
120+
Docker desktop allows to run linux containers on windows using WSL. Existing Linux distributions used for WSL do not typically support NUMA.
121+
It is expected that a custom Linux distribution would be required for WSL to run the Ansys Prime Server container to support NUMA.
122+
Ansys does not recommend you to run the Ansys Prime Server image without NUMA support.
123+
124+
Build or install the Ansys Prime Server image
125+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
126+
127+
You can install the Ansys Prime Server image in the following ways:
128+
129+
• Download it from the GitHub Container Registry.
130+
131+
• Build the Ansys Prime Server Linux container.
132+
133+
134+
GitHub container registry
135+
^^^^^^^^^^^^^^^^^^^^^^^^^
136+
137+
.. note::
138+
You should have write access to the repository or should be a members of the Ansys organization.
139+
140+
After installing Docker on your machine, follow these steps to download the Linux Docker container
141+
for the Ansys Prime Server and install this image.
142+
143+
1. Download the Docker image from the `PyPrimeMesh repository <https://github.com/ansys/pyprimemesh>`_ on GitHub using your GitHub credentials.
144+
2. Use a GitHub personal access token with permission for reading packages to authorize Docker to access the PyPrimeMesh repository. For more information, see `Managing your personal access tokens <https://docs.github.com/en/authentication/keeping-your-account-and-data- secure/managing-your-personal-access-tokens>`_ in the GitHub documentation.
145+
3. Save the token to a file using this command:
146+
147+
.. code-block:: pycon
148+
149+
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > GH_TOKEN.txt
150+
151+
4. Authorize Docker to access the repository and run the commands for your OS.
152+
153+
**Linux:**
154+
155+
.. code-block:: pycon
156+
157+
setenv GH_USERNAME <your_github_username>
158+
cat GH_TOKEN.txt | docker login ghcr.io -u $GH_USERNAME --password-stdin
159+
160+
5. Pull the Ansys Prime Server locally using Docker using the following command:
161+
162+
.. code-block:: pycon
163+
164+
docker pull ghcr.io/ansys/prime:25.1.0
165+
166+
167+
Build the Ansys Prime Server linux container
168+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
169+
170+
You can build the Ansys Prime Server Docker containers from the PyPrimeMesh repository docker folder.
171+
The docker folder has the linux/Dockerfile that builds the Linux-based Docker image.
172+
173+
.. note::
174+
Ansys Prime Server does not support building windows-based docker images.
175+
176+
You can build the docker image file as follows:
177+
178+
• **Build from available Ansys installation**: Builds the Docker image using the Ansys installation available in the machine where the Docker image is being built.
179+
180+
Prerequisites
181+
''''''''''''''
182+
183+
Ensure that Docker is installed in your machine. If you do not have Docker available, see :ref:`Docker for Linux containers <Docker for Linux containers>`.
184+
185+
186+
Build from available Ansys installation
187+
''''''''''''''''''''''''''''''''''''''''
188+
189+
To build your own image from your Ansys installation, follow these instructions:
190+
191+
1. Go to the Docker folder in your local PyPrimeMesh repository.
192+
193+
2. Execute the script with the following command (no specific location needed):
194+
195+
.. code-block:: pycon
196+
197+
python build_docker_linux.py <ANSYS_INSTALLATION_PATH>
198+
199+
For example,
200+
201+
.. code-block:: pycon
202+
203+
$AWP_ROOT251/commonfiles/CPython/3_10/linx64/Release/python/bin/python build_docker_linux.py $AWP_ROOT251
204+
205+
3. Check that the image has been created successfully.
206+
207+
You can view the docker image created with latest tag as follows:
208+
209+
.. figure:: ../images/docker_image.png
210+
:width: 800pt
211+
:align: center
212+
213+
Launch the Ansys Prime Server
214+
''''''''''''''''''''''''''''''
215+
216+
Ansys Prime Server can be launched using the PyPrimeMesh launcher.
217+
You should set the following mandatory environment variable for launching the Ansys Prime Server:
218+
219+
- PYPRIMEMESH_LAUNCH_CONTAINER: Launches the Ansys Prime Server form the PyPrimeMesh container.
220+
221+
- PYPRIMEMESH_IMAGE_TAG: Latest version of the Ansys Prime Server docker image.
222+
223+
- ANSYSLMD_LICENSE_FILE: License server required for launching the Ansys Prime Server.
224+
225+
Setting the environment variable
226+
'''''''''''''''''''''''''''''''''
227+
228+
Define the following general environment variables prior to using the Ansys Prime Server launcher.
229+
230+
**Linux**
231+
232+
.. code-block:: pycon
233+
234+
export PYPRIMEMESH_LAUNCH_CONTAINER=1
235+
export PYPRIMEMESH_IMAGE_TAG=<latest>
236+
export ANSYSLMD_LICENSE_FILE=<valid license server>
237+
238+
.. note::
239+
Docker image creation is supported from 2025 R1 version.
240+
241+
Launching Ansys Prime Server
242+
''''''''''''''''''''''''''''''
243+
244+
Ansys Prime Server can be launched as follows:
245+
246+
.. code-block:: pycon
247+
248+
>>> from ansys.meshing import prime
249+
>>> client = prime.launch_prime()
250+
>>> model = client.model
251+
252+
253+
254+
255+
256+
257+
258+
259+

doc/source/images/docker_image.png

31.4 KB
Loading

doc/styles/config/vocabularies/ANSYS/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ignore_self_proximity
2020
IGA
2121
[Ii]sogeometric
2222
JTOpen
23+
[Ll]inux
2324
[Ll]ucid
2425
Material Point Manager
2526
[Mm]eshedgeodesic

0 commit comments

Comments
 (0)