This is an automated email from the ASF dual-hosted git repository.

zhouyuan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new f71350979b [VL] Add devcontainer configuration for Gluten Velox 
Backend (#12125)
f71350979b is described below

commit f71350979bdfa7e81ae885986822dd86c3eccdc9
Author: Felipe Pessoto <[email protected]>
AuthorDate: Tue May 26 01:17:45 2026 -0700

    [VL] Add devcontainer configuration for Gluten Velox Backend (#12125)
    
    * Add devcontainer configuration for Gluten Velox Backend
    
    * [DOC] Add Dev Container guide for Velox backend
    
    Add a dedicated developer doc at docs/developers/dev-container.md that
    explains the .devcontainer/devcontainer.json workflow shipped with the
    repository: the default apache/gluten:vcpkg-centos-9 image, the
    postCreateCommand that runs ./dev/ci-velox-buildstatic-centos-9.sh,
    prerequisites (Docker + VS Code Dev Containers extension or Codespaces),
    how to open the workspace in a Dev Container, how to customize the
    configuration to use a different pre-built image, and how to use the
    images directly with `docker run`.
    
    The new doc also points readers at 
https://hub.docker.com/r/apache/gluten/tags
    for the full list of available images and at velox-backend-CI.md for
    the Dockerfile-to-tag mapping.
    
    Add a brief 'Dev Container' subsection under the Environment section of
    docs/developers/NewToGluten.md that links to the new guide so new
    contributors can find it from the entry-point document.
    
    Co-authored-by: Copilot <[email protected]>
    
    ---------
    
    Co-authored-by: Copilot <[email protected]>
---
 .devcontainer/devcontainer.json  |  5 +++
 docs/developers/NewToGluten.md   |  7 +++
 docs/developers/dev-container.md | 95 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 107 insertions(+)

diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 0000000000..342f94f678
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,5 @@
+{
+    "name": "Gluten Velox Backend (vcpkg-centos-9, static link)",
+    "image": "apache/gluten:vcpkg-centos-9",
+    "postCreateCommand": "./dev/ci-velox-buildstatic-centos-9.sh"
+}
diff --git a/docs/developers/NewToGluten.md b/docs/developers/NewToGluten.md
index 43c9433d22..9fc761940d 100644
--- a/docs/developers/NewToGluten.md
+++ b/docs/developers/NewToGluten.md
@@ -41,6 +41,13 @@ Gluten requires Maven  3.6.3 or above.
 
 Gluten requires GCC 11 or above.
 
+### Dev Container
+
+To skip the manual environment setup, you can develop Gluten inside a 
pre-built Docker
+image using the [Dev Container](https://containers.dev/) configuration shipped 
at
+`.devcontainer/devcontainer.json`. See [Dev Container](./dev-container.md) for 
a brief
+guide and the list of available Gluten Docker images.
+
 ## Development
 
 To debug Java/Scala code, follow the steps in 
[build-gluten-with-velox-backend](../get-started/Velox.md#build-gluten-with-velox-backend).
diff --git a/docs/developers/dev-container.md b/docs/developers/dev-container.md
new file mode 100644
index 0000000000..25a2f47077
--- /dev/null
+++ b/docs/developers/dev-container.md
@@ -0,0 +1,95 @@
+---
+layout: page
+title: Dev Container
+nav_order: 18
+parent: Developer Overview
+---
+
+# Develop Gluten in a Dev Container
+
+Gluten ships a [Dev Container](https://containers.dev/) configuration at
+[`.devcontainer/devcontainer.json`](https://github.com/apache/gluten/blob/main/.devcontainer/devcontainer.json)
+so you can develop inside a pre-built Docker image with the Velox/Gluten native
+toolchain already installed. This is the fastest way to get a working Gluten 
build
+without manually installing JDK, Maven, GCC, vcpkg, and the rest of the native
+dependencies on your host.
+
+## What the default configuration does
+
+The default configuration opens the workspace inside 
`apache/gluten:vcpkg-centos-9`
+(static link, CentOS 9, GCC toolset 12) and runs
+`./dev/ci-velox-buildstatic-centos-9.sh` as its `postCreateCommand` to perform 
the
+initial native Velox + Gluten C++ build with vcpkg. After the post-create step
+finishes, the container is ready for a Maven build (for example,
+`mvn package -Pbackends-velox -DskipTests`).
+
+## Prerequisites
+
+- [Docker](https://docs.docker.com/get-docker/) (or any other OCI runtime 
supported by
+  your editor) installed and running on the host, **or** a GitHub 
Codespaces-enabled
+  account.
+- Either:
+  - [Visual Studio Code](https://code.visualstudio.com/) with the
+    [Dev Containers 
extension](https://code.visualstudio.com/docs/devcontainers/containers),
+    or
+  - [GitHub Codespaces](https://docs.github.com/en/codespaces) (the
+    `.devcontainer/devcontainer.json` is picked up automatically when you 
create a
+    Codespace for the repository).
+
+## Open the workspace in a Dev Container
+
+In VS Code:
+
+1. Open the cloned Gluten repository.
+2. Run the **Dev Containers: Reopen in Container** command from the Command 
Palette
+   (`F1`).
+3. Wait for the image to be pulled and the `postCreateCommand` to finish. The 
first
+   run includes the native build and can take a while depending on your 
machine.
+
+In Codespaces, just create a new Codespace for the repository -- the same flow 
is
+executed in the cloud.
+
+## Available images
+
+The default `apache/gluten:vcpkg-centos-9` is only one of several pre-built 
images
+maintained by the Gluten community. Other images are available as well -- see 
the
+full list at
+[https://hub.docker.com/r/apache/gluten/tags](https://hub.docker.com/r/apache/gluten/tags).
+
+The Dockerfiles that produce these images, and a summary of what each one is 
intended
+for (CentOS 8/9, static vs. dynamic link, different JDK versions, CUDF, etc.), 
are
+documented in [Velox Backend CI](./velox-backend-CI.md#docker-build).
+
+## Customize the configuration
+
+To use a different image -- for example a dynamically linked CentOS 8 image 
with
+JDK 17 -- edit `.devcontainer/devcontainer.json` and update the `image` field, 
and
+the `postCreateCommand` if the toolchain provided by the new image requires a
+different build script:
+
+```jsonc
+{
+    "name": "Gluten Velox Backend (centos-8-jdk17, dynamic link)",
+    "image": "apache/gluten:centos-8-jdk17",
+    "postCreateCommand": "./dev/builddeps-veloxbe.sh --run_setup_script=ON 
--enable_vcpkg=OFF --build_arrow=OFF"
+}
+```
+
+You can also drop the `postCreateCommand` entirely if you prefer to run the 
native
+build manually inside the container; see
+[Build Gluten Velox backend in docker](./velox-backend-build-in-docker.md) for 
the
+full set of build flags and the trade-offs between static and dynamic linking.
+
+## Use the image without a Dev Container
+
+The same images can be used directly with `docker run` if you do not want to 
use the
+Dev Containers tooling:
+
+```bash
+docker run -it --rm -v "$PWD":/workspace -w /workspace 
apache/gluten:vcpkg-centos-9 bash
+# then, inside the container:
+./dev/ci-velox-buildstatic-centos-9.sh
+```
+
+See [Build Gluten Velox backend in docker](./velox-backend-build-in-docker.md) 
for
+more involved build recipes (packaging the Gluten jar, dynamic-link builds, 
etc.).


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to