Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build Nebula Graph source code using Docker

2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to use Docker to build Nebula Graph source code, the article is very detailed, has a certain reference value, interested friends must read it!

Nebula Graph introduction

Nebula Graph is an open source high-performance distributed graph database. The project is developed in C++ language and built with cmake tools. Two of the important dependencies are Facebook's Thrift RPC framework and folly library.

As the project is developed using the C++ 14 standard, a newer version of the compiler and some third-party libraries are needed. Although Nebula Graph officially provides a developer build guide, building a complete compilation environment locally is still not an easy task.

Construction of development environment

Nebula Graph is heavily dependent, and some third-party libraries need to be compiled and installed locally. In order to facilitate developers to compile the project source code locally, Nebula Graph officially provides you with a pre-installed docker image of all dependencies. Developers only need the following three steps to quickly compile the Nebula Graph project and participate in the open source contribution of Nebula Graph:

Install Docker locally

Pull the vesoft/nebula-dev image locally

$docker pull vesoft/nebula-dev

Run Docker and mount the Nebula source directory to the container's / home/nebula directory

$docker run-- rm-ti-v {nebula-root-path}: / home/nebula vesoft/nebula-dev bash

Thanks to your community partner @ Adong for your suggestion, replace the {nebula-root-path} above with your Nebula Graph actual clone directory

To avoid retyping the above commands after each exit from the docker container, we provide a simple build.sh script in vesoft-inc/nebula-dev-docker to enter the container through. / build.sh / path/to/nebula/root/.

Using cmake to build a Nebula project

Docker > mkdir _ build & & cd _ build docker > cmake. & & make-j2 docker > ctest # perform unit test reminder

At present, the Nebula project is mainly compiled by static dependency, plus some additional debugging information, so some executable files produced will take up disk space. It is recommended that partners reserve more than 20 GB of free space for the Nebula directory:)

Docker accelerates small Tips

Since Docker image files are stored abroad, slow speed may be encountered in the pull process. Here, Nebula Graph provides a method to accelerate pull: solve it by configuring domestic addresses, for example:

Azure China Mirror https://dockerhub.azk8s.cn

Qiniuyun https://reg-mirror.qiniu.com

Linux friends can add the following to / etc/docker/daemon.json (if the file does not exist, please create a new file)

{"registry-mirrors": ["https://dockerhub.azk8s.cn"," https://reg-mirror.qiniu.com"]}

For macOS users, please click the Docker Desktop icon-> Preferences-> Daemon-> Registry mirrors. Add https://dockerhub.azk8s.cn and https://reg-mirror.qiniu.com to the list. After modification, click the Apply & Restart button to restart Docker.

The above is all the content of the article "how to use Docker to build Nebula Graph source code". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report