class ansys.pyensight.core.DockerLauncher(data_directory: str | None = None, docker_image_name: str | None = None, use_dev: bool = False, channel: Channel | None = None, pim_instance: Any | None = None, **kwargs)#

Creates a Session instance using a copy of EnSight hosted in a Docker container.

This class allows you to either attach to a PIM-launched Docker container hosting EnSight or launch a local Docker container hosting EnSight. gRPC connections to EnShell and EnSight are established. A PyEnSight Session instance is returned upon successful launch and connection.

data_directorystr, optional

Host directory to make into the container at /data. The default is None.

docker_image_namestr, optional

Name of the Docker image to use. The default is None.

use_devbool, optional

Whether to use the latest ensight_dev Docker image. The default is False. However, this value is overridden if the name of a Docker image is specified for the docker_image_name parameter.


Existing gRPC channel to a running EnShell instance provided by PIM.


PyPIM instance if using PIM (internal). The default is None.

timeoutfloat, optional

Number of seconds to try a gRPC connection before giving up. This parameter is defined on the parent Launcher class, where the default is 120.

use_eglbool, optional

Whether to use EGL hardware for accelerated graphics. The platform must be able to support this hardware. This parameter is defined on the parent Launcher class, where the default is False.

use_sosint, optional

Number of EnSight servers to use for SOS (Server of Server) mode. This parameter is defined on the parent Launcher class, where the default is None, in which case SOS mode is not used.


>>> from ansys.pyensight.core import DockerLauncher
>>> launcher = DockerLauncher(data_directory="D:\data")
>>> launcher.pull()
>>> session = launcher.start()
>>> session.close()



Get the Ansys version (three-digit string) found in the Docker container.


Shut down the launched EnSight session.


Create and bind a Session instance to the created EnSight gRPC connection started by EnShell.


Get the contents of the EnShell log if possible.


Get the PIM file service object if available.


Pull the Docker image.


Start EnShell by running a local Docker EnSight image.


Release any additional resources allocated during launching.



Root directory for HTML files.