Configure your Deephaven Instance
This last section covers configuration details needed to take your Deephaven instance beyond the defaults.
Authentication
Keeping your real-time data secure is one of Deephaven's top priorities. As such, the default installation of Deephaven is equipped with pre-shared key (PSK) authentication. By default, this key is randomly generated and available in the Docker logs (if using Docker) on startup:
It is advised that you change the password from a randomly generated string to your own password for enhanced security. For the Docker one-liner installation, you can set your password with the -Dauthentication.psk
flag:
docker run --rm --name deephaven -p 10000:10000 -v data:/data --env START_OPTS=-Dauthentication.psk=YOUR_PASSWORD_HERE ghcr.io/deephaven/server:latest
If you're using pip-installed Deephaven, you can set the pre-shared key with the jvm_args
parameter when starting a Deephaven server:
from deephaven_server import Server
s = Server(jvm_args=["-Dauthentication.psk=YOUR_PASSWORD_HERE"])
s.start()
To learn more about PSK authentication, see the user guide on the topic.
In addition to PSK authentication, Deephaven supports the following types of authentication:
Deployments
Deephaven provides multiple docker images. Each of these images, called deployments, comes pre-installed with different Python packages. You also have the option of including Deephaven's example data in any of these images. For example, the server-all-ai
image comes pre-installed with PyTorch, Tensorflow, scikit-learn, and nltk. You can use this image with this Docker command:
docker run --rm --name deephaven -p 10000:10000 ghcr.io/deephaven/server-all-ai:latest
To learn more about deployments, check out the guide for installing Deephaven with Docker.
Installing Python packages
Even with a standard deployment, you'll likely need to install new Python packages at some point. The process for installing a package is different for Docker-run Deephaven and pip-installed Deephaven.
If you're using Docker-installed Deephaven, you can install packages from within the Deephaven IDE:
import os
os.system("pip install gpytorch")
Such installations will not persist after the Deephaven server has shut down. To learn about persistent package installations, see the user guide on installing Python packages.
Package persistence will not be a problem if you're using pip-installed Deephaven. All packages present in the environment where the deephaven-server
package is installed will be available in Deephaven. New packages are installed in the usual way:
(env) pip install gpytorch
RAM
Large datasets require significant memory — often much more than the 4G that Deephaven allocates by default. Fortunately, it's easy to give Deephaven more memory, whether you have a Docker or a pip installation.
If you're using Docker-installed Deephaven, Docker itself imposes memory constraints on processes it runs - you can raise this ceiling in Docker Desktop by going to Settings > Resources
and raising the memory parameter. Then, you can specify the memory allocated to Deephaven with the -Xmx
flag. Here's the command to pull and run the latest version of the Deephaven server with 16G of RAM:
docker run --rm --name deephaven -p 10000:10000 --env START_OPTS=-Xmx16g ghcr.io/deephaven/server:latest
The same argument can be used to raise the memory ceiling for pip-installed Deephaven:
from deephaven_server import Server
s = Server(jvm_args=["-Xmx16g"])
s.start()
The memory guide explains more about allocating memory in Deephaven.
Keep your instance up-to-date
The data world is ever-evolving, and so is Deephaven. It's easy to keep your instance up-to-date, taking advantage of the latest features and bug fixes.
If you're running Deephaven with Docker, simply use docker pull
to pull the latest version of the image from the repository:
docker pull ghcr.io/deephaven/server:latest
Users with custom Docker installations should check out this guide for information on updating custom instances.
In the pip-installed Deephaven world, you can update the Deephaven Python package the same way you'd update any Python package:
pip install --upgrade deephaven-server