Building Ocean
This document describes the general process to build Ocean. Platform-specific instructions are available in the sub-pages.
Prerequisites
Before building Ocean, ensure you have the following:
- Git: Required to clone the repository
- Python 3.8 or higher: Required for the build scripts
- CMake 3.26 or higher: Build system generator
- A compatible C++ compiler for your target platform
Getting the Source Code
Clone the Ocean repository:
git clone https://github.com/facebookresearch/ocean.git
cd ocean
Build Overview
Ocean's build process follows two steps:
- Build third-party dependencies using
build/python/build_ocean_3rdparty.py— this fetches, patches, and builds all required libraries with DAG-based parallel builds - Build Ocean using
build/python/build_ocean.py— this configures and builds Ocean via CMake with the correct settings for your target platform
Quick Start (macOS/Linux)
# Build third-party libraries
python build/python/build_ocean_3rdparty.py
# Build Ocean
python build/python/build_ocean.py --third-party-layout python
Quick Start (Windows)
# Build third-party libraries
python build/python/build_ocean_3rdparty.py
# Build Ocean
python build/python/build_ocean.py --third-party-layout python
The build system supports cross-compilation for multiple platforms from a single host. For example, on macOS you can build for iOS and Android in addition to macOS itself.
Each platform has specific requirements and options. See the platform-specific sub-pages for detailed instructions:
tip
This documentation is also available on GitHub.