forked from gongsu832/onnx-mlir
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Devcontainer files and Docs (onnx#2048)
Signed-off-by: Maximilian Bartel <[email protected]> Co-authored-by: gongsu832 <[email protected]>
- Loading branch information
Showing
4 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -186,3 +186,4 @@ dmypy.json | |
|
||
# Visual Studio Code Files | ||
.vscode | ||
.devcontainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ARG BASE_IMAGE="onnxmlirczar/onnx-mlir-llvm-static:amd64" | ||
FROM ${BASE_IMAGE} | ||
|
||
RUN apt-get update | ||
|
||
# 2) Install optional packages, comment/uncomment/add as you see fit. | ||
RUN apt-get install -y vim bash valgrind clang-format lsb-release \ | ||
wget software-properties-common ssh-client gdb | ||
RUN python3 -m pip install -U pip && pip install commitizen | ||
|
||
# For development | ||
ENV LLVM_PROJECT_ROOT=/workdir/llvm-project | ||
ENV MLIR_DIR=/workdir/llvm-project/build/lib/cmake/mlir | ||
ENV eval "$(ssh-agent)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"build": { "dockerfile": "Dockerfile.llvm-project" }, | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "bash", | ||
"cmake.mergedCompileCommands": "${workspaceFolder}/compile_commands.json", | ||
"cmakeExplorer.suiteDelimiter": ".", | ||
"cmakeExplorer.debugConfig": "(gdb) Launch", | ||
"editor.formatOnSave": true, | ||
"[cpp]": { | ||
"editor.defaultFormatter": "xaver.clang-format", | ||
"editor.tabSize": 2 | ||
}, | ||
"clangd.path": "/usr/bin/clangd-15", | ||
"clangd.arguments": [ | ||
"--background-index", | ||
"-header-insertion=never", | ||
"-j=4" | ||
], | ||
"cmake.buildDirectory": "${workspaceFolder}/build", | ||
"cmake.generator": "Ninja", | ||
"cmake.defaultVariants": { | ||
"buildType": { | ||
"default": "reldeb", | ||
"description": "The build type.", | ||
"choices": { | ||
"debug": { | ||
"short": "Debug", | ||
"long": "Disable optimizations - include debug information.", | ||
"buildType": "Debug" | ||
}, | ||
"release": { | ||
"short": "Release", | ||
"long": "Optimize for speed - exclude debug information.", | ||
"buildType": "Release" | ||
}, | ||
"minsize": { | ||
"short": "MinSizeRel", | ||
"long": "Optimize for smallest binary size - exclude debug information.", | ||
"buildType": "MinSizeRel" | ||
}, | ||
"reldeb": { | ||
"short": "RelWithDebInfo", | ||
"long": "Optimize for speed - include debug information.", | ||
"buildType": "RelWithDebInfo" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"extensions": [ | ||
"llvm-vs-code-extensions.vscode-clangd", | ||
"vadimcn.vscode-lldb", | ||
"ms-vscode.cmake-tools", | ||
"fredericbonnet.cmake-test-adapter", | ||
"twxs.cmake", | ||
"xaver.clang-format", | ||
"notskm.clang-tidy", | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"eamodio.gitlens", | ||
"llvm-vs-code-extensions.vscode-mlir", | ||
"cschlosser.doxdocgen", | ||
"chneau.resource-monitor", | ||
"spmeesseman.vscode-taskexplorer", | ||
"edonet.vscode-command-runner" | ||
] | ||
} | ||
}, | ||
"workspaceFolder": "${localWorkspaceFolder}", | ||
"workspaceMount": "source=${localWorkspaceFolder},target=${localWorkspaceFolder},type=bind,consistency=cached", | ||
"postAttachCommand": "ONNX_ROOT=third_party/onnx && cd ${ONNX_ROOT} && python3 -m pip install . && cd ../.." | ||
} |