nuclio: Error: Nuctl on Windows 10 (- exec: "/bin/sh": file does not exist & - Failed to create auto platform)

Hello,

  1. Running Nuctl on Windows 10.
  2. Downloaded from: https://github.com/nuclio/nuclio/releases/tag/1.4.17
  3. Reference and Context: https://github.com/openvinotoolkit/cvat/issues/2127#issuecomment-691507873
  4. Procedure Followed: https://github.com/openvinotoolkit/cvat/blob/develop/cvat/apps/documentation/installation.md#semi-automatic-and-automatic-annotation

I am getting these errors while executing the command nuctl create project abc. Tried multiple versions and got different errors.

Error on nuctl version - 1.4.17

Error - exec: "/bin/sh": file does not exist
    /nuclio/pkg/cmdrunner/cmdrunner.go:124

Error on nuctl version - 1.3.17 and 1.1.37 (and below 1.4.x)

Error - Failed to create auto platform
    .../nuclio/nuclio/pkg/platform/factory/factory.go:73

I am able to access Nuclio UI Dashboard on localhost:8070 though!

Thanks a lot!

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 7
  • Comments: 22 (2 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for the suggestion, tried that earlier and got this error.

~/CVAT/Nuclio
$ chmod +x nuctl-1.4.17-linux-amd64

~/CVAT/Nuclio
$ ./nuctl-1.4.17-linux-amd64 create project test
bash: ./nuctl-1.4.17-linux-amd64: cannot execute binary file: Exec format error

Anything missing here @s3298230?

Also, do you have Docker installed via WSL? and linked to Docker Desktop on Windows?

Thanks!

Since I got this issue months ago and not sure what I have done to make it work on my laptop. Therefore, I get a fresh windows 10 and have the following steps to make nuctl work:

1/Enable WSL 2 2/Install ubuntu 18.04 3/Install docker WITHIN ubuntu 18.04 (WSL) using this guide (https://github.com/openvinotoolkit/cvat/blob/develop/cvat/apps/documentation/installation.md#ubuntu-1804-x86_64amd64) 4/Install docker desktop for windows (https://download.docker.com/win/stable/Docker Desktop Installer.exe) 5/From Windows Docker Desktop Setting : General tab : check the “Expose daemon on…” Resources tab > WSL Integration : check Ubuntu 18.04 6/Restart WSL (powershell: wsl --shutdown then wsl 7/Clone CVAT and deploy with Serverless component to have nuclio up and running at port 8070 8/Get the latest NUCLI for LINUX (NOT windows) and chmod 700 6/Run a test command : ./nuctl get function - this should return “no function found”

Give it a try and let me know if this work around works for you

P/S: I used ubuntu console to run all the commands (no git bash nor Powershell). My windows 10 specs: Windows 10 - 2004 build 19041.508 Docker 19.03.13

image image

Hey @s3298230, Thanks for the detailed explanation!

Got a catch here, My Environment: Windows 10 - 1809. Build 17763

Need Version 1903 or higher, with Build 18362 or higher for WSL2 it seems: https://docs.microsoft.com/en-us/windows/wsl/install-win10.

Hard luck for me I guess! 😦 Thanks a lot though!

I tried to run nuctl create project abc from development branch (https://github.com/nuclio/nuclio/commit/1da32485b27980e1a95fd2867c4299cad9fc34bb).

More detailed stack trace from debugger:

github.com/nuclio/nuclio/pkg/cmdrunner.(*ShellRunner).Run at cmdrunner.go:124
github.com/nuclio/nuclio/pkg/dockerclient.NewShellClient at shell.go:63
github.com/nuclio/nuclio/pkg/containerimagebuilderpusher.NewDocker at docker.go:29
github.com/nuclio/nuclio/pkg/platform/local.NewPlatform at platform.go:89
github.com/nuclio/nuclio/pkg/platform/factory.CreatePlatform at factory.go:51
github.com/nuclio/nuclio/pkg/platform/factory.CreatePlatform at factory.go:73
github.com/nuclio/nuclio/pkg/nuctl/command.(*RootCommandeer).createPlatform at nuctl.go:153
github.com/nuclio/nuclio/pkg/nuctl/command.(*RootCommandeer).initialize at nuctl.go:117
github.com/nuclio/nuclio/pkg/nuctl/command.newCreateProjectCommandeer.func1 at create.go:82
github.com/spf13/cobra.(*Command).execute at command.go:826
github.com/spf13/cobra.(*Command).ExecuteC at command.go:914
github.com/spf13/cobra.(*Command).Execute at command.go:864
github.com/nuclio/nuclio/pkg/nuctl/command.(*RootCommandeer).Execute at nuctl.go:96
github.com/nuclio/nuclio/cmd/nuctl/app.Run at nuctl.go:24
main.main at main.go:29

Seems like nuctl tries to create Docker shell client and tries to run docker version https://github.com/nuclio/nuclio/blob/b4fa2daf76cc332490e7613226750ad99f2d5737/pkg/dockerclient/shell.go#L63 but there are not /bin/sh executable, https://github.com/nuclio/nuclio/blob/b4fa2daf76cc332490e7613226750ad99f2d5737/pkg/cmdrunner/cmdrunner.go#L69 https://github.com/nuclio/nuclio/blob/b4fa2daf76cc332490e7613226750ad99f2d5737/pkg/cmdrunner/cmdrunner.go#L86 so command runner fails: https://github.com/nuclio/nuclio/blob/b4fa2daf76cc332490e7613226750ad99f2d5737/pkg/cmdrunner/cmdrunner.go#L124

Why use shell client instead of Docker API Client? Why use shell runner instead of direct execution?

@s3298230 I am running Windows 10 and wsl2. I have tried your instructions, but with no success. (Lots of other attempts, not based on your instructions without success, too.)

One thing I’m not clear about from your instructions is getting Docker twice. I have the Windows desktop version, with proper settings (including Ubuntu 18.04 box checked). But I don’t know how to do #3 in your instructions (and regrettably, the link referenced there is broken).

But I’m not even sure that’s the problem (or at least not the entire problem).

Is all this still functional for you on your setup? Just wondering.

Also, in spite of your really great instructions, I am a noob and am not always sure what to do where. For example: a) You did #7 (“Clone CVAT and deploy with Serverless component to have nuclio up and running at port 8070”) in Ubuntu terminal? b) And can you please clarify (also from #7) what exact steps one takes to do this: “deploy with Serverless component to have nuclio up and running at port 8070” c) I downloaded and copied the nuctl version 1.5.16 for linux from the appropriate link to my Ubuntu home directory. (It’s just a file with no extension.) Is that it? When I run the test command you recommend, I don’t get what you get.

Thanks for your consideration.

@s3298230 Thanks for your answer! I got a 8 GB ram laptop with a Intel® Core™ i5-9300H CPU @ 2.40GHz processor, and a 3 GB dedicated GeForce GTX 1050 card. I don’t know about that, but it seems like there are some files the system is unable to retrieve. I think I will try to build CVAT and Nuclio from scratch. Some results from running Get-ComputerInfo:

WindowsBuildLabEx                                       : 20236.1000.amd64fre.rs_prerelease.201009-1631
WindowsCurrentVersion                                   : 6.3
WindowsProductName                                      : Windows 10 Home
WindowsVersion                                          : 2004
BiosBIOSVersion                                         : {HPQOEM - 1072009, F.13, American Megatrends - 5000D}
BiosVersion                                             : HPQOEM - 1072009
CsModel                                                 : HP Pavilion Notebook 15-bc5xxx
CsNumberOfLogicalProcessors                             : 8
CsNumberOfProcessors                                    : 1
CsProcessors                                            : {Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz}
CsSystemFamily                                          : 103C_5335KV HP Pavilion
CsSystemType                                            : x64-based PC
CsTotalPhysicalMemory                                   : 8388513792
CsPhyicallyInstalledMemory                              : 8388608
OsName                                                  : Microsoft Windows 10 Home Insider Preview
OsVersion                                               : 10.0.20236
OsBuildNumber                                           : 20236
OsBuildType                                             : Multiprocessor Free
OsTotalVisibleMemorySize                                : 8191908
OsFreePhysicalMemory                                    : 4086440
OsTotalVirtualMemorySize                                : 16056228
OsFreeVirtualMemory                                     : 8824812
OsInUseVirtualMemory                                    : 7231416
OsSizeStoredInPagingFiles                               : 7864320
OsFreeSpaceInPagingFiles                                : 7789288
OsManufacturer                                          : Microsoft Corporation
OsMaxNumberOfProcesses                                  : 4294967295
OsMaxProcessMemorySize                                  : 137438953344
OsArchitecture                                          : 64 bits
OsLanguage                                              : es-ES

Results of running nvidia-smi:

Wed Oct 21 11:22:13 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 452.41       Driver Version: 452.41       CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 1050   WDDM  | 00000000:01:00.0 Off |                  N/A |
| N/A   36C    P8    N/A /  N/A |     94MiB /  3072MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1516    C+G   Insufficient Permissions        N/A      |
|    0   N/A  N/A     11864    C+G   ...5n1h2txyewy\SearchApp.exe    N/A      |
|    0   N/A  N/A     12600    C+G   ...ekyb3d8bbwe\YourPhone.exe    N/A      |
|    0   N/A  N/A     13140    C+G   ...2txyewy\TextInputHost.exe    N/A      |
|    0   N/A  N/A     14448    C+G   ...8wekyb3d8bbwe\Cortana.exe    N/A      |
|    0   N/A  N/A     16816    C+G   ...8bbwe\WindowsTerminal.exe    N/A      |
+-----------------------------------------------------------------------------+

Sorry for the late response, that specs look good to me … Are you able to resolve the issue by building CVAT and Nuclio from scratch?

It worked! Thanks a lot for your support!

@idil-k glad I could help! Let me know if the model works inside CVAT. You might have to stop the container for it then start it again. I deployed quite a few of the cvat models but only the tensorflow faster rcnn one worked in cvat for me. A couple failed to deploy, others just didn’t work in cvat - quite frustrating. I think they’re trying to fix F-BRS at the moment

Hello

@s3298230 thanks a lot for the description, it really did help a lot! I followed the steps and was able to deploy yolov3-tf successfully. image

However, when I navigate to localhost:8080 I still cannot use any models or there is no model tab. image

When I check the containers, I noticed that I do not have the quay.io/nuclio/dashboard one. Could this be the reason why the model is not visible in the UI? Why was this container not created? Is there a step that I missed? image

I would really appreciate the help. Thank you!

Hi,

Any update on this or any workaround for those with no WSL2?

Thanks!

I tried to run nuctl create project abc from development branch (1da3248).

More detailed stack trace from debugger:

github.com/nuclio/nuclio/pkg/cmdrunner.(*ShellRunner).Run at cmdrunner.go:124
github.com/nuclio/nuclio/pkg/dockerclient.NewShellClient at shell.go:63
github.com/nuclio/nuclio/pkg/containerimagebuilderpusher.NewDocker at docker.go:29
github.com/nuclio/nuclio/pkg/platform/local.NewPlatform at platform.go:89
github.com/nuclio/nuclio/pkg/platform/factory.CreatePlatform at factory.go:51
github.com/nuclio/nuclio/pkg/platform/factory.CreatePlatform at factory.go:73
github.com/nuclio/nuclio/pkg/nuctl/command.(*RootCommandeer).createPlatform at nuctl.go:153
github.com/nuclio/nuclio/pkg/nuctl/command.(*RootCommandeer).initialize at nuctl.go:117
github.com/nuclio/nuclio/pkg/nuctl/command.newCreateProjectCommandeer.func1 at create.go:82
github.com/spf13/cobra.(*Command).execute at command.go:826
github.com/spf13/cobra.(*Command).ExecuteC at command.go:914
github.com/spf13/cobra.(*Command).Execute at command.go:864
github.com/nuclio/nuclio/pkg/nuctl/command.(*RootCommandeer).Execute at nuctl.go:96
github.com/nuclio/nuclio/cmd/nuctl/app.Run at nuctl.go:24
main.main at main.go:29

Seems like nuctl tries to create Docker shell client and tries to run docker version https://github.com/nuclio/nuclio/blob/b4fa2daf76cc332490e7613226750ad99f2d5737/pkg/dockerclient/shell.go#L63

correct, it is a sanity test to ensure docker client + have it logged for debugability manner

but there are not /bin/sh executable, https://github.com/nuclio/nuclio/blob/b4fa2daf76cc332490e7613226750ad99f2d5737/pkg/cmdrunner/cmdrunner.go#L69

That is the key issue here

https://github.com/nuclio/nuclio/blob/b4fa2daf76cc332490e7613226750ad99f2d5737/pkg/cmdrunner/cmdrunner.go#L86

so command runner fails: https://github.com/nuclio/nuclio/blob/b4fa2daf76cc332490e7613226750ad99f2d5737/pkg/cmdrunner/cmdrunner.go#L124

Why use shell client instead of Docker API Client?

Docker API Client provides a lot of feature and great addons, but it lacks of important features (e.g.: --gpus, not yet supported).

Why use shell runner instead of direct execution? Providing an abstraction layer above, being able to provide with complex commands, etc.

I believe the solution here would be to use to implement docker client shell over windows PowerShell