If DH_DND_PYTHON
is set to true
in your cluster.cnf
file, then a default Python virtual environment is configured for Core+ workers. You can also create alternative Python virtual environments and assign them to your own custom worker kinds.
To install a Python environment for the Core+ worker, you must create a virtual environment and configure it properly for the installed Community version. Deephaven recommends placing them in /usr/illumon/coreplus/venv/
.
In the following example, we create a default virtual environment in the /usr/illumon/coreplus/venv/0.37.4-custom
directory. The requirements.txt
file provides a list of packages and versions that Deephaven has tested with this distribution. You should use it as a starting point for adding, removing, or replacing packages. Deephaven does not test integrations with package versions other than those listed in requirements.txt
.
In addition to the requirements.txt
file (which references packages available via pip
), you must also install the Deephaven Core+ worker wheel. It is recommended that you also install the Deephaven Core+ client wheel.
Note
In the snippets below, be sure to change the path to match your Core+ install and select the proper Community pip
package version.
The following snippet installs a custom Python virtual environment with pip
:
# Replace the paths below where you wish to a) install the virtual environment,
# b) take the requirements.txt file (which specifies Python dependencies) from,
# and c) source the appropriate Enterprise Core+ wheels.
#
# While not required, Deephaven recommends that you install the virtual environment
# inside the Core+ package directory for each specific version.
venvPath=/usr/illumon/coreplus/venv/0.37.4-custom
sudo -u irisadmin python3.10 -m venv $venvPath
sudo -u irisadmin /bin/bash -c "source $venvPath/bin/activate && \
pip3.10 install -r /usr/illumon/coreplus/latest/py/resources/requirements.txt && \
pip3.10 install /usr/illumon/coreplus/latest/py/wheel/deephaven_coreplus_worker-1.20240517.344-py3-none-any.whl && \
pip3.10 install /usr/illumon/coreplus/latest/py/wheel/deephaven_coreplus_client-1.20240517.344-py3-none-any.whl"
If, instead, you prefer to use conda
, refer to the snippet below to install a custom Python virtual environment:
export PYTHONNOUSERSITE=True
conda create --prefix /usr/illumon/coreplus/venv/corePlusConda python=3.10
conda activate /usr/illumon/coreplus/venv/corePlusConda
/usr/illumon/coreplus/venv/corePlusConda/bin/pip3 install -r /usr/illumon/coreplus/latest/py/resources/requirements.txt
/usr/illumon/coreplus/venv/corePlusConda/bin/pip3 install /usr/illumon/coreplus/latest/py/wheel/deephaven_coreplus_worker-1.20240517.344-py3-none-any.whl
/usr/illumon/coreplus/venv/corePlusConda/bin/pip3 install /usr/illumon/coreplus/latest/py/wheel/deephaven_coreplus_client-1.20240517.344-py3-none-any.whl
You must create the virtual environment on each query server.