Build From Source
NVIDIA HeavyAI Open Source Build
This document outlines the steps to download, build, and deploy the open source edition of NVIDIA HeavyAI.
Prerequisites
Confirm the following are in place before starting:
ghCLI installed and authenticated — rungh auth loginif you haven’t already- A GitHub token with
read:packages+reposcopes — yourgh auth tokenoutput typically satisfies this - Docker Engine, NVIDIA drivers, and
nvidia-container-toolkitinstalled on the build host (see Step 1)
1. Prepare the build environment
The HeavyAI build process requires a Linux host running Docker Engine with NVIDIA drivers and nvidia-container-toolkit installed. The build environment can be the same machine that will run HeavyAI in production, or any separate system that meets these requirements — including a dedicated build server or a cloud VM.—
Pre-open source release: use
heavyai/heavydb-internalinstead ofheavyai/heavydbwherever the repository name appears in this guide.
Install the following on your Linux build host using the official documentation for each:
- Docker Engine — install and configure Docker Engine on Ubuntu
- NVIDIA drivers — datacenter and GPU driver installation guide
- NVIDIA Container Toolkit — enables GPU access inside Docker containers
Additionally, if this is the first time you’re installing NVIDIA HeavyAI on the machine, please install the following Docker configuration, by writing the following into /etc/docker/daemon.json
After installing this configuration, restart Docker with this command:
sudo systemctl restart docker
Verification
Once all three are installed, confirm the GPU passthrough is working: docker run --rm nvidia/cuda:12.0-base nvidia-smi. If it prints your GPU details, the environment is ready.
2. Clone the repository
Clone heavyai/heavydb to your build machine and enter the project directory:
Note: This repository requires a GitHub account with access to the HeavyAI organization. Ensure
gh auth loginhas been run and your token hasread:packages+reposcopes.
3. Pull the build container
The HeavyAI build system compiles all components inside a deps container, ensuring a consistent toolchain regardless of what is installed on the host. Pull the deps image for your target distribution before building, executing the below in your heavydb (or heavydb-internal) cloned repository folder:
Other supported distributions:
Note: Pulling the deps image is a one-time operation per distro. Building the deps image from scratch (if no pre-built image is available) is a multi-hour process; pulling a pre-built image from GHCR is the expected workflow. The build system auto-detects the local deps image on subsequent runs and prefers Ubuntu over Rocky when multiple images are present. Override with
--deps-image=<image>if needed.
4. Obtain API keys
Immerse requires two API keys for map chart functionality. These are passed as environment variables at build time — they are baked into the Immerse artifact during compilation and never written to a config file on disk.
- Mapbox — basemap tiles for pointmap, choropleth, linemap, and other geo charts
- Google Maps Geocoding — powers the zoom-to address search box on map charts
4a. Create a Mapbox access token
- Sign in at account.mapbox.com.
- Open Tokens → Create a token and give it a descriptive name.
- Use a public token (begins with
pk.). Do not use a secretsk.token — Immerse runs in the browser. - Enable at minimum these scopes:
STYLES:READ,STYLES:TILES,FONTS:READ,DATASETS:READ.DATASETS:READis only required if you use custom Mapbox Studio styles. - Optionally add URL restrictions to limit where the token can be used:
- Copy the token — you will need it in Step 5.
Warning: Mapbox charges per map load and tile request beyond the free tier. URL restrictions and your own token are strongly recommended over any shared or vendor-supplied default.
4b. Create a Google Maps Geocoding API key
- Open Google Cloud Console and create or select a project.
- Go to APIs & Services → Library, search for Geocoding API, and enable it.
- Go to APIs & Services → Credentials → Create credentials → API key.
- Copy the key.
- Apply key restrictions if desired or required by your IT policy. Note that because this key is used directly within the end user’s browser, any IP-based restrictions must account for the full range of your users’ client IP addresses rather than server IPs.
- Under Application restrictions, HTTP referrer restrictions are generally preferable to IP restrictions for browser-side keys:
- Under API restrictions, limit to Geocoding API only.
- Ensure billing is enabled on the project. Google requires this even when usage stays within the free credit tier.
5. Build the Docker image
With both keys ready, run the full build from inside the heavydb directory. Pass the API keys as environment variables alongside your GitHub token — this keeps credentials out of any config file on disk.
Pre-open source release:
PRIVATE_PACKAGES_TOKEN=$(gh auth token)is required to access private npm packages used during the Immerse build. This token requirement will be removed once the repository is public.
Replace pk.xxx with your Mapbox public token and your-google-key with your Google Geocoding API key from Step 4.
This builds all components and packages them into a single Docker image:
Build output is written to build/ubuntu22.04/logs/. If a step fails, the last 50 lines of the relevant log are printed automatically. You can also tail a log directly:
6. Confirm the image
Once the build completes, confirm that the new HeavyAI product image was created:
You should see two new images. For example:
Warning: The image whose name begins with
core-build-is the build container used to compile HeavyAI — it does not run HeavyAI. Only the product image (e.g.heavyai-ubuntu22.04-cuda-render-x86_64:10.0.0) should be deployed to your production environment.
Note the full product image name and tag from your output — you will need it in Step 7.
7. Deploy to your production environment
Update your existing docker-compose.yml with the new image name, then start the service. If you built on a separate machine from where HeavyAI will run, you’ll also need to export and transfer the image first.
Update docker-compose.yml
Open your existing docker-compose.yml and update the image: field for the HeavyAI service to match the product image name from Step 6:
Note: Only the
image:value needs to change — all other settings in yourdocker-compose.yml(volumes, ports, environment, restart policy) can remain as-is.
If you built on the same machine where HeavyAI runs, apply the updated compose file and start the service now:
Export and transfer to production
Skip this section if the build machine is the same as the production host. Otherwise, save the image to a compressed archive and transfer it along with the updated docker-compose.yml using rsync.
On the build machine:
On the production host:
Note: A full HeavyAI image is typically 15–20 GB uncompressed. Ensure sufficient disk space on both machines before exporting. The
--progressflag onrsyncwill show live transfer throughput.
8. Verify the installation
Open a browser and navigate to your HeavyAI host on port 6273:
Then perform the following checks to confirm maps and geocoding are working correctly:
- Log in and create a new dashboard.
- Add a new chart and select Choropleth as the chart type.
- Basemap tiles: the map background should render fully with no gray or blank tiles. Open browser DevTools → Network and confirm Mapbox tile requests return HTTP 200 with your
access_tokenquery parameter present. Any 401 responses indicate theMAPBOX_TOKENwas missing or invalid at build time. - Geocoder: locate the zoom-to search box in the chart toolbar. Type a city name (e.g. Austin) and confirm the map pans and zooms to that location. In DevTools → Network, Geocoding API requests should return 200 with your
keyparameter present. - Save the dashboard. Reload the page and confirm the choropleth and basemap render correctly on load.
Note: If the zoom-to search box is not visible, check that
ui/disable_map_geocoderis not set totruein yourfeature_flagsconfiguration.
9. Initial configuration (optional)
If you are configuring a fresh HeavyAI environment rather than upgrading an existing one, consider completing the following before going live. None of these are required for a functional installation, but all are strongly recommended for security and usability.
Change the admin password
Log in to Immerse as admin using the default password (HyperInteractive), then navigate to Admin Portal → Users → admin → Edit to set a new password. Alternatively, use heavysql directly:
Configure servers.json
Immerse’s default connection behavior, feature flags, UI element visibility, and branding are all controlled through a servers.json file. This file must be referenced from heavy.conf and placed in your HEAVYAI_STORAGE directory.
Step 1: In the [web] section of heavy.conf, add:
Step 2: Create servers.json in your storage directory. At minimum, set the default database connection. You can also pre-populate credentials to enable automatic login:
Warning: Storing a password in
servers.jsonenables auto-login for all users arriving at the Immerse URL. Only do this in controlled environments where access to the URL is already restricted. Omit"password"to present the login form instead.
Feature flags
The feature_flags object inside servers.json controls global Immerse UI defaults. Common settings for a new deployment:
See the full feature flags reference for all available options.
Controlling UI visibility with immerse_ui_keys
Use immerse_ui_keys to show or hide parts of the Immerse interface. For example, to hide the help dropdown and data manager while keeping everything else visible:
To start from a blank slate and only expose specific elements:
See the full UI keys reference for all available key values.
Branding and custom styles
Use the customStyles object to add your own logo, login page text, browser tab title, and chart color palettes:
Logo URLs must be browser-accessible http(s) URLs — filesystem paths are not supported. See the full branding reference for color palette options (solid, ordinal, quantitative, custom).
Custom basemap styles
To use Mapbox Studio styles or third-party OGC-compliant raster tile sources as basemaps in geo charts, add the mapboxCustomStyles array:
Setting "default": true on a style makes it the initial basemap shown in new geo charts. See the full basemap styles reference for more detail.
After creating or modifying servers.json or heavy.conf, restart the service for changes to take effect:
Enable TLS termination
If HeavyAI is exposed directly (not behind a TLS-terminating load balancer or reverse proxy), configure HTTPS in the [web] section of heavy.conf:
Mount the certificate directory into the container via your docker-compose.yml:
Note: If nginx, Traefik, or a cloud load balancer is already terminating TLS in front of HeavyAI, skip this step. Enabling TLS inside the container when it is already terminated upstream will cause connection errors.
Restart the service after any changes to heavy.conf:
Troubleshooting
Offline / no third-party API alternatives
- No Mapbox: omit
MAPBOX_TOKENat build time and set"offline": trueinservers.jsonto use built-in country-outline basemaps instead. - No Google geocoding: omit
GOOGLE_API_KEYat build time and set"ui/enable_local_geocoder": trueinfeature_flagsto use the HeavyAI/geocoderendpoint (requires server-side geocoder support).
References
- Docker Engine installation — Ubuntu
- NVIDIA driver installation guide
- NVIDIA Container Toolkit installation guide
- HeavyAI Immerse customization guide — servers.json reference, feature flags, UI keys, branding, custom basemaps
- HeavyAI web server configuration parameters
- HeavyDB configuration parameters
- Mapbox access tokens
- Google Geocoding API