w-okada / voice-changer

リアルタイムボイスチェンジャー Realtime Voice Changer
Other
15.54k stars 1.68k forks source link

[ISSUE]: Docker build not working with ubuntu WSL #1013

Open shep920 opened 8 months ago

shep920 commented 8 months ago

Voice Changer Version

branch f529331

Operational System

Windows 10

GPU

n/a

Read carefully and check the options

Model Type

n/a

Issue Description

I am trying to build with docker on wsl/ubuntu, however i am getting this error

npm run build:docker:vcclient

> voice-changer@1.0.0 build:docker:vcclient
> date +%Y%m%d%H%M%S > docker_vcclient/dummy && DOCKER_BUILDKIT=1 docker build -f docker_vcclient/Dockerfile docker_vcclient/ -t vcclient

'DOCKER_BUILDKIT' is not recognized as an internal or external command,
operable program or batch file.

Is this a WSL issue, or is the docker outdated?

Application Screenshot

No response

Logs on console

npm run build:docker:vcclient

> voice-changer@1.0.0 build:docker:vcclient
> date +%Y%m%d%H%M%S > docker_vcclient/dummy && DOCKER_BUILDKIT=1 docker build -f docker_vcclient/Dockerfile docker_vcclient/ -t vcclient

'DOCKER_BUILDKIT' is not recognized as an internal or external command,
operable program or batch file.
madoibito80 commented 8 months ago

@shep920 I encountered the same issue and managed to solve it. The DOCKER_BUILDKIT=1 docker build syntax is designed for the bash shell, but the default shell used by npm varies depending on the environment. To address this, you should execute the command npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe" beforehand. This sets bash as the shell for npm. For more details, please refer to this Stack Overflow discussion: https://stackoverflow.com/questions/23243353/how-to-set-shell-for-npm-run-scripts-in-windows.