@@ -41,120 +41,13 @@ PyAnsys Geometry is a Python client library for the Ansys Geometry service.
41
41
Usage
42
42
-----
43
43
44
- There are two different ways of getting started with the Geometry service and its client- library, PyAnsys Geometry.
44
+ There are different ways of getting started with using the Geometry service and its client library, PyAnsys Geometry.
45
45
46
- Using PyAnsys Geometry launcher
47
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46
+ For more information, see
47
+ ` Getting Started < https://geometry.docs.pyansys.com/version/stable/getting_started/index.html >`_ documentation.
48
48
49
- PyAnsys Geometry is provided with an internal launcher that is capable of handling the specifics of
50
- launching the Geometry service locally. The only requirements are that:
51
-
52
- * Docker is installed on your machine.
53
- * You have access to the Geometry service image.
54
-
55
- .. note ::
56
-
57
- The Geometry service is mainly available as a Windows Docker image. The development
58
- team is working on getting the Linux Docker container available as soon as possible. In the meantime,
59
- make sure that your Docker engine is configured to run Windows Docker images.
60
-
61
- Using the GitHub Container Registry image
62
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63
-
64
- First, bear in mind that you have to be `authenticated to ghcr.io
65
- <https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry> `_.
66
- Once authenticated, please proceed to download the Geometry service Docker image:
67
-
68
- .. code :: bash
69
-
70
- docker pull ghcr.io/ansys/geometry:< tag>
71
-
72
- The following OS-dependent tags are available:
73
-
74
- * ``windows-latest ``
75
- * ``windows-latest-unstable ``
76
- * ``linux-latest ``
77
- * ``linux-latest-unstable ``
78
-
79
- Build your own Geometry service image
80
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
81
-
82
- Access the ``docker `` folder in this repository and go through the instructions
83
- presented in the `main README file <https://github.com/ansys/pyansys-geometry/blob/main/docker/README.rst >`_.
84
-
85
- Launching the Geometry service image
86
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
87
-
88
- Next, you will be ready to run the Geometry service directly from PyAnsys Geometry:
89
-
90
- .. code :: python
91
-
92
- from ansys.geometry.core.connection import launch_modeler
93
-
94
- modeler = launch_modeler()
95
-
96
- The previous ``launch_modeler() `` method will launch the Geometry service under the default
97
- conditions. For more configurability, please use ``launch_local_modeler() ``.
98
-
99
- Manual service launch
100
- ^^^^^^^^^^^^^^^^^^^^^
101
-
102
- First, start the Geometry service locally. If you have Docker installed and have
103
- `authenticated to ghcr.io `_, you can start the service locally using Docker with:
104
-
105
- .. code :: bash
106
-
107
- docker run --name ans_geo -e LICENSE_SERVER=< LICENSE-SERVER> -p 50051:50051 ghcr.io/ansys/geometry:< TAG>
108
-
109
- The Geometry service has a set of environment variables that are **mandatory **:
110
-
111
- * ``LICENSE_SERVER ``: the license server (IP, DNS) to which the Geometry service shall connect. For example, ``127.0.0.1 ``.
112
-
113
- Other optional environment variables are:
114
-
115
- * ``ENABLE_TRACE ``: whether to set up the trace level for debugging purposes. Expects either ``1 `` or ``0 ``.
116
- By default, ``0 `` (which means it is not activated).
117
- * ``LOG_LEVEL ``: sets the Geometry service logging level. By default, ``2 ``.
118
-
119
- Next, connect to the service with:
120
-
121
- .. code :: python
122
-
123
- from ansys.geometry.core import Modeler
124
-
125
- modeler = Modeler()
126
-
127
- By default ``Modeler `` connects to ``127.0.0.1 `` (``'localhost' ``) on
128
- port ``50051 ``. You can change this by modifying the ``host `` and ``port ``
129
- parameters of ``Modeler ``, but note that you must also modify
130
- your ``docker run `` command by changing ``<HOST-PORT>:50051 ``.
131
-
132
- If you want to change the defaults, modify the following environment variables:
133
-
134
- **On Linux/Mac OS **
135
-
136
- .. code ::
137
-
138
- export ANSRV_GEO_HOST=127.0.0.1
139
- export ANSRV_GEO_PORT=50051
140
-
141
- **On Windows Powershell **
142
-
143
- .. code ::
144
-
145
- $env:ANSRV_GEO_HOST="127.0.0.1"
146
- $env:ANSRV_GEO_PORT=50051
147
-
148
- **On Windows CMD **
149
-
150
- .. code ::
151
-
152
- SET ANSRV_GEO_HOST=127.0.0.1
153
- SET ANSRV_GEO_PORT=50051
154
-
155
-
156
- Install the package
157
- -------------------
49
+ Installation
50
+ ------------
158
51
159
52
PyAnsys Geometry has three installation modes: user, developer, and offline.
160
53
0 commit comments