Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM nvcr.io/nvidia/pytorch:25.12-py3

RUN --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
apt-get update \
&& apt-get install -y sccache \
&& rm -rf /var/lib/apt/lists/*

RUN pip uninstall -y transformer-engine
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "Transformer Engine Dev Container",
"build": {
"dockerfile": "Dockerfile"
},
"mounts": [
"source=${localEnv:HOME}/.bash_history_devcontainer,target=/home/ubuntu/.bash_history,type=bind,consistency=cached",
"source=${localEnv:HOME}/.cache,target=/home/ubuntu/.cache,type=bind,consistency=cached"
],
"initializeCommand": ".devcontainer/initializeCommand.sh",
"postCreateCommand": ".devcontainer/postCreateCommand.sh",
"remoteUser": "ubuntu",
"runArgs": [
"--gpus=all",
"--shm-size=4g"
],
"containerEnv": {},
"customizations": {
"vscode": {
"extensions": [
"charliermarsh.ruff",
"eamodio.gitlens",
"ms-python.python",
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml"
]
}
}
}
4 changes: 4 additions & 0 deletions .devcontainer/initializeCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail

mkdir -p ~/.cache/sccache
5 changes: 5 additions & 0 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail

# pip install ninja
NVTE_USE_CCACHE=1 NVTE_CCACHE_BIN=sccache NVTE_FRAMEWORK=pytorch NVTE_BUILD_DEBUG=1 pip install -v --no-build-isolation -e .
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ compile_commands.json
tensor_dumps/
artifacts/
*.DS_Store
logs/
Loading