Install Determined Using Linux Packages

Determined releases Debian and RPM packages for installing the Determined master and agent as systemd services on machines running Linux.

We support installing the Determined master and agent using Debian packages on Ubuntu 16.04 or 18.04, or using RPM packages on Red Hat 7-based Linux distributions (e.g., Red Hat Enterprise Linux, CentOS, Oracle Linux, and Scientific Linux).

Preliminary Setup

PostgreSQL

Determined uses a PostgreSQL database to store experiment and trial metadata. You may either use a Docker container or your Linux distribution’s package and service.

If you are using an existing PostgreSQL installation, we recommend confirming that max_connections is at least 96, which is sufficient for Determined.

Run PostgreSQL in Docker

  1. Pull the official Docker image for PostgreSQL. We recommend using version 10 or greater.

    docker pull postgres:10
    

    This image is not provided by Determined AI; please see its Docker Hub page for more information.

  2. Start PostgreSQL as follows:

    docker run \
        -d \
        --restart unless-stopped \
        --name determined-db \
        -p 5432:5432 \
        -v determined_db:/var/lib/postgresql/data \
        -e POSTGRES_DB=determined \
        -e POSTGRES_PASSWORD=<Database password> \
        postgres:10
    

    If the master will connect to PostgreSQL via Docker networking, exposing port 5432 via the -p argument isn’t necessary; however, you may still want to expose it for administrative or debugging purposes. In order to expose the port only on the master machine’s loopback network interface, pass -p 127.0.0.1:5432:5432 instead of -p 5432:5432.

Install PostgreSQL using apt or yum

  1. Install PostgreSQL 10 or greater.

    On Debian distributions:

    sudo apt install postgresql-10
    

    On Red Hat distributions, first configure the PostgreSQL yum repository as described here in order to then install version 10:

    sudo yum install postgresql-server -y
    sudo postgresql-setup initdb
    sudo systemctl start postgresql.service
    sudo systemctl enable postgresql.service
    
  2. The authentication methods enabled by default may vary depending on the provider of your PostgreSQL distribution. Ensure that an appropriate authentication method is configured in pg_hba.conf to enable the determined-master to connect to the database.

    When configuring the database connection (Configure and Start the Cluster):

    • If you specify the db.hostname property, a PostgreSQL host (TCP/IP) connection will be required.

    • If you omit the db.hostname property, a PostgreSQL local (Unix-domain socket) connection will be required.

  3. Finally, create a database for Determined’s use and configure a system account that Determined will use to connect to the database. For example, the following commands will create a database named determined, a user named determined with the password determined-password, and then will grant the user access to the database:

    sudo -u postgres psql
    postgres=# CREATE DATABASE determined;
    postgres=# CREATE USER determined WITH ENCRYPTED PASSWORD 'determined-password';
    postgres=# GRANT ALL PRIVILEGES ON DATABASE determined TO determined;
    

Master and Agent

  1. Go to the webpage for the latest Determined release.

  2. Download the appropriate Debian or RPM package file, which will have the name determined-master_VERSION_linux_amd64.[deb|rpm] (with VERSION replaced by an actual version, such as 0.21.0). The agent package is similarly named determined-agent_VERSION_linux_amd64.[deb|rpm].

  3. Install the master package on one machine in your cluster, and the agent package on each agent machine.

    On Debian distributions:

    sudo apt install <path to downloaded package>
    

    On Red Hat distributions:

    sudo rpm -i <path to downloaded package>
    

    Before running the Determined agent, you will have to install Docker on each agent machine and, if the machine has GPUs, ensure that the Nvidia Container Toolkit is working as expected.

Configure and Start the Cluster

  1. Ensure that an instance of PostgreSQL is running and accessible from the machine where the master will be run.

  2. Edit the YAML configuration files at /etc/determined/master.yaml (for the master) and /etc/determined/agent.yaml (for each agent) as appropriate for your setup. Ensure that the user, password, and database name correspond to your PostgreSQL configuration.

    db:
      host: <PostgreSQL server IP or hostname, e.g., 127.0.0.1 if running on the master>
      port: <PostgreSQL port, e.g., 5432 by default>
      name: <Database name, e.g., determined>
      user: <PostgreSQL user, e.g., postgres>
      password: <Database password>
    
  3. Start the master.

    sudo systemctl start determined-master
    

    The master can also be run directly with the command determined-master, which may be helpful for experimenting with Determined (e.g., testing different configuration options quickly before writing them to the configuration file).

  4. Optionally, configure the master to start on boot.

    sudo systemctl enable determined-master
    
  5. Verify that the master started successfully by viewing the log.

    journalctl -u determined-master
    

    You should see logging indicating that the master can successfully connect to the database, and the last line should indicate http server started on the configured WebUI port (8080 by default). You can also validate that the WebUI is running by navigating to http://<master>:8080 with your web browser (or https://<master>:8443 if TLS is enabled). You should see No Agents on the right-hand side of the top navigation bar.

  6. Start the agent on each agent machine.

    sudo systemctl start determined-agent
    

    Similarly, the agent can be run with the command determined-agent.

  7. Optionally, configure the agent to start on boot.

    sudo systemctl enable determined-agent
    
  8. Verify that each agent started successfully by viewing the log.

    journalctl -u determined-agent
    

    You should see logging indicating that the agent started successfully, detected compute devices, and connected to the master. On the Determined WebUI, you should now see slots available, both on the right-hand side of the top navigation bar, and if you select the Cluster view in the left-hand navigation panel.

Socket Activation

The master can be configured to use systemd socket activation, allowing it to be started automatically on demand (e.g., when a client makes a network connection to the port) and restarted with reduced loss of connection state. To switch to socket activation, run the following commands:

sudo systemctl disable --now determined-master
sudo systemctl enable --now determined-master.socket

When socket activation is in use, the port on which the master listens is configured differently; the port listed in the master config file is not used, since systemd manages the listening socket. The default socket unit for Determined is configured to listen on port 8080. To use a different port, run:

sudo systemctl edit determined-master.socket

which will open a text editor window. To change the listening port, insert the following text (with the port number substituted appropriately) into the editor and then exit the editor:

[Socket]
ListenStream=
ListenStream=0.0.0.0:<port>

For example, you might want to configure the master to listen on port 80 for HTTP traffic or on port 443 if using TLS.

After updating the configuration, run the following commands to put the change into effect (this will restart the master):

sudo systemctl stop determined-master
sudo systemctl restart determined-master.socket

See the systemd documentation on socket unit files or systemctl for more information.

Manage the Cluster

To configure a service to start running automatically when its machine boots up, run sudo systemctl enable <service>, where the service is determined-master or determined-agent. You can also use sudo systemctl enable --now <service> to enable and immediately start a service in one command.

To view the logging output of a service, run journalctl -u <service>.

To manually stop a service, run sudo systemctl stop <service>.