Skip to content

Commit

Permalink
Merge pull request #205 from qulacs/nanobind-include
Browse files Browse the repository at this point in the history
コンテナ内の `nanobind` のインストール方法を変更
  • Loading branch information
gandalfr-KY authored Mar 4, 2025
2 parents ed9f912 + 3bd71b4 commit 72542c4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .devcontainer/cpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ RUN git clone --recursive https://github.com/kokkos/kokkos.git /tmp/kokkos --dep
cp -r /tmp/kokkos-build/include /usr/local/include/kokkos && \
rm -rf /tmp/kokkos /tmp/kokkos-build

RUN pip install nanobind==2.0.0

ARG USERNAME=vscode
ARG GROUPNAME=vscode
ARG USER_UID=1000
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/cpu/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"build/_deps/eigen-src",
"build/_deps/googletest-src/googletest/include",
"build/_deps/json-src/include",
"~/.local/lib/python3.10/site-packages/nanobind/include",
"/usr/local/lib/python3.10/dist-packages/nanobind/include/",
"/usr/include/python3.10"
],
"C_Cpp.default.cppStandard": "c++23",
Expand Down
2 changes: 2 additions & 0 deletions .devcontainer/gpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@ RUN git clone --recursive https://github.com/kokkos/kokkos.git /tmp/kokkos --dep
cp -r /tmp/kokkos-build/include /usr/local/include/kokkos && \
rm -rf /tmp/kokkos /tmp/kokkos-build

RUN pip install nanobind==2.0.0

USER vscode
2 changes: 1 addition & 1 deletion .devcontainer/gpu/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"build/_deps/eigen-src",
"build/_deps/googletest-src/googletest/include",
"build/_deps/json-src/include",
"~/.local/lib/python3.10/site-packages/nanobind/include",
"/usr/local/lib/python3.10/dist-packages/nanobind/include/",
"/usr/include/python3.10"
],
"C_Cpp.default.cppStandard": "c++23",
Expand Down
7 changes: 7 additions & 0 deletions include/scaluq/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,10 @@ struct adl_serializer<::scaluq::StdComplex> {
}
};
} // namespace nlohmann

#ifdef SCALUQ_USE_NANOBIND
#include <nanobind/nanobind.h>
namespace scaluq {
namespace nb = nanobind;
}
#endif

0 comments on commit 72542c4

Please sign in to comment.