Open6
[Ubuntu + VSCode + devcontainer + Docker + Electron] Human & ElectronJS の検証
git clone https://github.com/vladmandic/human-electron
cd human-electron && git checkout c1394c712263074759a50c951f1a99182e0f6614
- コンテナ起動前に
.devcontainer/devcontainer.json
の編集(作成)
.devcontainer/devcontainer.json
{
"name": "Node.js & TypeScript",
"image": "mcr.microsoft.com/devcontainers/typescript-node:0-18",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"runArgs": [
// "--gpus", "all",
// "--shm-size", "64gb",
"--device", "/dev/video0:/dev/video0:mwr",
"--privileged",
"-e", "DISPLAY=:1",
"-e", "QT_X11_NO_MITSHM=1",
"-v", "/tmp/.X11-unix/:/tmp/.X11-unix:rw"
]
}
- devcontainerの起動方法は下記参照
- VSCode のターミナルで下記実行
npm install --save-exact esbuild
sudo apt-get update \
&& sudo apt-get install -y \
fakeroot rpm libnss3-dev \
libgdk-pixbuf2.0-dev libgtk-3-dev \
libxss-dev libasound2 yarn
yarn -D add electron
- インストーラのビルド - VSCode のターミナルで下記実行
npm run make
- 実行 - VSCode のターミナルで下記実行
sudo chmod 777 /dev/video* && npm run start
- Ubuntu + VSCode + devcontainer + Electron + WebGL