devcontainer: devontainer environment is failed to load `make prepare`
The make prepare command can work well on the macOS environment, but it does not work in the dev-container environment.
The failed reason is that -i'' support replacing files in place, but it creates a temporary file for all the files together and this temporary file in a container environment cannot have the right permission, like below:
vscode ➜ /workspace (master) $ ls -la ./gpt4all/gpt4all-backend/llama.cpp/tests/
ls: cannot access './gpt4all/gpt4all-backend/llama.cpp/tests/sedCQKLDZ': No such file or directory
total 32
drwxr-xr-x 8 vscode vscode 256 May 16 09:06 .
drwxr-xr-x 40 vscode vscode 1280 May 16 09:06 ..
-rw-r--r-- 1 vscode vscode 498 May 16 09:06 CMakeLists.txt
-????????? ? ? ? ? ? sedCQKLDZ
-rw-r--r-- 1 vscode vscode 1733 May 16 09:06 test-double-float.c
-rw-r--r-- 1 vscode vscode 5156 May 16 09:06 test-quantize-fns.cpp
-rw-r--r-- 1 vscode vscode 11553 May 16 09:06 test-quantize-perf.cpp
-rw-r--r-- 1 vscode vscode 2680 May 16 09:06 test-tokenizer-0.cpp
If we replace every single file separately.
Switched to a new branch 'build'
sed: couldn't open temporary file ./go-bert/bert.cpp/ggml/tests/sedNL8DL3: Permission denied
sed: couldn't open temporary file ./go-bert/bert.cpp/ggml/tests/sedSIYv08: Permission denied
sed: couldn't open temporary file ./go-bert/bert.cpp/ggml/tests/sed4gMLCd: Permission denied
sed: couldn't open temporary file ./go-bert/bert.cpp/ggml/tests/sedB7xVzj: Permission denied
sed: couldn't open temporary file ./go-bert/bert.cpp/ggml/tests/sedotAign: Permission denied
sed: couldn't open temporary file ./go-bert/bert.cpp/ggml/tests/sedteQxGs: Permission denied
sed: couldn't open temporary file ./go-bert/bert.cpp/ggml/tests/sedNHuhtv: Permission denied
sed: couldn't open temporary file ./go-bert/bert.cpp/ggml/tests/sedLBDXYC: Permission denied
sed: couldn't open temporary file ./go-bert/bert.cpp/ggml/tests/sedUPUFkI: Permission denied
sed: couldn't open temporary file ./go-bert/bert.cpp/ggml/tests/sed8Ghc7M: Permission denied
sed: couldn't open temporary file ./go-bert/bert.cpp/ggml/tests/sedVAU2GO: Permission denied
sed: couldn't open temporary file ./go-bert/bert.cpp/ggml/tests/sedZOX44T: Permission denied
sed: couldn't open temporary file ./go-bert/bert.cpp/ggml/tests/sed4JsU2Y: Permission denied
sed: couldn't open temporary file ./go-bert/bert.cpp/ggml/src/sedXCTBh3: Permission denied
sed: couldn't open temporary file ./go-bert/bert.cpp/ggml/src/sedLwDiNa: Permission denied
It will cause the execution of the task were failed.
Here is an open issue for tracking this https://github.com/devcontainers/images/issues/566
dev-container can help the developer move forward quickly without caring about environmental conflict issues. It can help the developer keep focusing on the project itself.
So, if we fix this issue, it can bring invaluable benefits.