.. _Configtoml:

Using the config.toml File
==========================

Admins can edit a config.toml file when starting the Driverless AI Docker image. The config.toml file includes all possible configuration options that would otherwise be specified in the ``nvidia-docker run`` command. This file is located in a folder on the container. You can make updates to environment variables directly in this file. Driverless AI will use the updated config.toml file when starting from native installs. Docker users can specify that updated config.toml file when starting Driverless AI Docker image.

Docker Image Users
------------------

1. Copy the config.toml file from inside the Docker image to your local filesystem. 

 ::

	# Make a config directory
	mkdir config

	# Copy the config.toml file to the new config directory.
	nvidia-docker run \
	  --pid=host \
	  --rm \
	  --init \
	  -u `id -u`:`id -g` \
	  -v `pwd`/config:/config \
	  --entrypoint bash \
	  h2oai/dai-centos7-x86_64:1.4.0-9.0
	  -c "cp /etc/dai/config.toml /config"

2. Edit the desired variables in the config.toml file. Save your changes when you are done.

3. Start Driverless AI with the DRIVERLESS_AI_CONFIG_FILE environment variable. Make sure this points to the location of the edited config.toml file so that the software finds the configuration file.

 ::

	nvidia-docker run \
	  --pid=host \
	  --init \
	  --rm \
	  -u `id -u`:`id -g` \
	  -e DRIVERLESS_AI_CONFIG_FILE="/config/config.toml" \
	  -v `pwd`/config:/config \
	  -v `pwd`/data:/data \
	  -v `pwd`/log:/log \
	  -v `pwd`/license:/license \
	  -v `pwd`/tmp:/tmp \
	  h2oai/dai-centos7-x86_64:1.4.0-9.0

Native Install Users
--------------------

Native installs include DEBs, RPMs, and TAR SH installs. 

1. Export the Driverless AI config.toml file or add it to ~/.bashrc. For example:

 ::

   export DRIVERLESS_AI_CONFIG_FILE=“/config/config.toml” 

2. Edit the desired variables in the config.toml file. Save your changes when you are done.

3. Start Driverless AI. Note that the command used to start Driverless AI varies depending on your install type.

For reference, below is a copy of the standard config.toml file included with this version of Driverless AI. The rest of this section describes some examples showing how to set different environment variables. 

Sample Config.toml File
-----------------------

.. literalinclude:: config.toml
