NVIDIA / NVIDIA/cccl

[FEA] Add `devcontainer/connect.sh` script that connects to running devcontainer

Open
#7,253 0 comments 0 reactions 0 assignees View on GitHub
devex infra
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

I use this powershell script to connect to running CCCL devcontainers in wsl. This is handy for using CLI agents, which are sometimes more convenient to run in a non-vscode terminal.

The bits that detect the current container and start a new shell should be made available.

```
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"

$wslWorkDir = "/home/allie/code/src/cccl"
$container = wsl -e docker ps --filter status=running --latest --quiet
$dockerCmd = "docker exec -it -u coder -w /home/coder/cccl $container bash"
$cmd = "cd $wslWorkDir && exec bash -ilc '$dockerCmd'"

Write-Host "Workdir: $wslWorkDir"
Write-Host "Command: $cmd"

& wsl -e bash -lc $cmd
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.