{
  "$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json",
  "name": "Faiss NPU (Ascend)",
  "image": "swr.cn-south-1.myhuaweicloud.com/ascendhub/cann:9.0.0-910b-ubuntu22.04-py3.11",
  "remoteUser": "root",
  "runArgs": [
    "--ipc=host",
    "--device=/dev/davinci0",
    "--device=/dev/davinci_manager",
    "--device=/dev/devmm_svm",
    "--device=/dev/hisi_hdc"
  ],
  "mounts": [
    "source=/usr/local/bin/npu-smi,target=/usr/local/bin/npu-smi,type=bind,readonly",
    "source=/usr/local/Ascend/driver,target=/usr/local/Ascend/driver,type=bind,readonly",
    "source=/etc/ascend_install.info,target=/etc/ascend_install.info,type=bind,readonly"
  ],
  "postCreateCommand": "bash .devcontainer/postCreateCommand.sh",
  "customizations": {
    "vscode": {
      "extensions": [
        "ms-python.python",
        "ms-python.vscode-pylance",
        "charliermarsh.ruff",
        "ms-vscode.cpptools-extension-pack",
        "twxs.cmake",
        "xaver.clang-format",
        "eamodio.gitlens"
      ],
      "settings": {
        "cmake.configureOnOpen": true,
        "python.defaultInterpreterPath": "/usr/local/python3.11.15/bin/python3",
        "python.terminal.activateEnvironment": true,
        "C_Cpp.default.compilerPath": "/usr/bin/g++",
        "files.eol": "\n"
      }
    }
  }
}