Skip to main content
Version: Python

How to install packages

This guide discusses how to install packages for use within Deephaven. The Deephaven server runs on a Debian Docker container, and that Docker container can be modified to install custom packages.


This guide discusses Unix packages. See the related documentation, How to install Python packages, or How to install Java packages.

docker exec

In order to install packages for use within Deephaven, you need to install them on the container. One of the easiest ways to do this is through docker exec.

With the default Deephaven docker-compose.yml file, docker-compose exec server can be used to run commands on the server container. This example shows how to install the popular text editor Vim.

docker-compose exec server apt-get update
docker-compose exec server apt-get install vim -y

Installing dependencies during build

The above example doesn't scale out for automated processes. In order to do this automatically, you'll need to create a custom Docker image that extends the base image, and use that image for launching Deephaven.

The following custom Dockerfile installs Vim during its build.


RUN apt-get update
RUN apt-get install vim -y

You'll then need to build this image, tag it with a name of your choice, and use that tag in your docker-compose.yml file. The following example shows how to do this with a tag named deephaven/custom-server.

docker build --tag deephaven/custom-server .

In the docker-compose.yml:

image: deephaven/custom-server

Once you've run these commands and updated your docker-compose.yml file, you can launch Deephaven with docker-compose up and your custom dependencies will be installed.

Using a shell script

For installing packages that require more than just apt-get commands (such as using a Makefile and having to change directories), you may want to use a shell script for the installation. This is very easy to do; simply create a shell script that is copied by the Dockerfile that contains the installation steps, and then run it. The following shows how to install Vim using a shell script.



RUN sh /

apt-get update
apt-get install vim -y