Skip to content

Repository files navigation

Setup Open Data Cube (ODC) with Docker 🛰

This repository contains step-by-step instructions and resources to set up Open Data Cube (ODC) using Docker. Open Data Cube enables efficient handling and analysis of large geospatial datasets. For detail tutorial, please refer to our ODC notion or Tutorial.pdf in the repo.

Table of Contents


What is Docker?

Docker is a platform for building, running, and sharing containerized applications. Containers allow you to package software and its dependencies together for seamless deployment.

For a detailed introduction to Docker, refer to:


Setup Instructions

Step 1: Install Docker

Install Docker Engine for your operating system:

Note: If you encounter WSL issues, follow the troubleshooting steps provided in the installation guide.

Step 2: Network Configuration

Ensure PostgreSQL and Datacube containers are on the same network:

docker network inspect bridge
docker network create <network-name>

Step 3: Pull Required Docker Images

Pull the necessary images from Docker Hub:

docker pull postgres
docker pull opendatacube/cube-in-a-box

Step 4: Build Containers

  • PostgreSQL:
docker run -d --name <postgres-container-name> -p 8080:5432 -e POSTGRES_PASSWORD=<password> postgres
  • Datacube:
docker run -d --name <datacube-container-name> -p 443:8888 -e DB_HOSTNAME=postgres -e DB_USERNAME=postgres -e DB_PASSWORD=<password> opendatacube/cube-in-a-box

Step 5: Start Unix Shell in ODC Container

Run the following to access the shell:

docker exec -it <datacube-container-name> bash

Step 6: Initialize Datacube

Initialize the database:

datacube -v system init

If errors occur, create and edit datacube.conf with appropriate settings.


Saving Datasets

Single Timestamp

Prepare the following:

  1. Python script: Export metadata (.py).
  2. Metadata file: Dataset description (.yaml).
  3. Product definition: To load datasets (.yaml).

Multiple Timestamps

Follow the single timestamp process but ensure consistency in the product and variable names across timestamps.

Time Series Data

Use provided modules to handle NetCDF files:

  1. Split_nc.py: Split time series data into slices.
  2. Metadata_auto_generater.py: Generate metadata.
  3. Metadata_import.bash: Automate metadata import.

Modules

This repository includes:

  • Split_nc.py: Split NetCDF files.
  • Metadata_auto_generater.py: Auto-generate metadata.
  • Metadata_import.bash: Automate metadata import.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages