Skip to content

Commit 3aeb1cb

Browse files
authored
Add a devcontainer configuration (#490)
1 parent def68ce commit 3aeb1cb

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
ARG BASE_IMAGE
2+
FROM ${BASE_IMAGE}
3+
ARG USERNAME=mscclpp
4+
ARG USER_UID=1000
5+
ARG USER_GID=$USER_UID
6+
7+
# Create the user
8+
RUN groupadd --gid $USER_GID $USERNAME && \
9+
useradd --uid $USER_UID --gid $USER_GID -m $USERNAME && \
10+
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME && \
11+
chmod 0440 /etc/sudoers.d/$USERNAME
12+
13+
USER $USERNAME

.devcontainer/devcontainer.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "MSCCL++ Dev Container",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"args": {
6+
"BASE_IMAGE": "ghcr.io/microsoft/mscclpp/mscclpp:base-dev-cuda12.8"
7+
}
8+
},
9+
"remoteUser": "mscclpp",
10+
"customizations": {
11+
"vscode": {
12+
"extensions": [
13+
// Python
14+
"ms-python.python",
15+
"ms-python.vscode-pylance",
16+
// C++
17+
"ms-vscode.cpptools",
18+
"ms-vscode.cpptools-extension-pack",
19+
"ms-vscode.cmake-tools"
20+
]
21+
}
22+
},
23+
"privileged": true,
24+
"runArgs": [
25+
"--net=host",
26+
"--ipc=host",
27+
"--gpus=all",
28+
"--ulimit=memlock=-1:-1"
29+
],
30+
"workspaceFolder": "/home/mscclpp/mscclpp",
31+
"workspaceMount": "source=${localWorkspaceFolder},target=/home/mscclpp/mscclpp,type=bind,consistency=cached"
32+
}

0 commit comments

Comments
 (0)