Skip to content

GitHub Codespaces/VSCode Devcontainer support #224

@brandonros

Description

@brandonros

It will be "a lot easier" if "new people looking to contribute" had a "VSCode devcontainer" they could "one click" and use.

It helps when you are on Windows/Mac and just want to develop (maybe not necessarily run against actual GPU)

I started something here but I can't open a draft PR because I am not a contributor (which is a good rule I guess)

https://github.com/Rust-GPU/Rust-CUDA/compare/main...brandonros:Rust-CUDA:main?expand=1

It is a little awkward to add git to the existing build images but it makes being able to commit changes "in the web UI" easier

It's all pretty painless except this "Optix" example, I think the Dockerfiles we have skip the Optix SDK/it is missing? Could it easily be added?

Activity

brandonros

brandonros commented on Jul 11, 2025

@brandonros
Author

I think I missed this already existing: https://github.com/Rust-GPU/Rust-CUDA/blob/main/.devcontainer.json

There might be room for improvement but it is probably good enough for now as is.

Just dropping this in case

FROM ghcr.io/rust-gpu/rust-cuda-ubuntu24-cuda12:latest
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \
    git && \
    rm -rf /var/lib/apt/lists/*
{
  "name": "Rust CUDA Development",
  "build": {
    "dockerfile": "Dockerfile"
  },
  "hostRequirements": {
    "cpus": 8,
    "memory": "32gb",
    "storage": "64gb"
  },
  "customizations": {
    "vscode": {
      "extensions": [
        "rust-lang.rust-analyzer",
        "ms-vscode.cpptools",
        "ms-vscode.cmake-tools",
        "nvidia.nsight-vscode-edition"
      ],
      "settings": {
        "rust-analyzer.cargo.features": "all",
        "rust-analyzer.checkOnSave.command": "clippy"
      }
    }
  },
  "forwardPorts": [],
  "postCreateCommand": "rustc --version && nvcc --version",
  "remoteUser": "root"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @brandonros

        Issue actions

          GitHub Codespaces/VSCode Devcontainer support · Issue #224 · Rust-GPU/Rust-CUDA