clearlinux / dockerfiles

Clear Linux-based Docker containers
155 stars 83 forks source link

DLRS (v0.4.0) has incomplete serve.sh script #236

Open poussa opened 5 years ago

poussa commented 5 years ago

When you try to run the OVMS on the container:

docker run --rm -v /opt/models/:/opt/ml:ro -p 9001:9001 -p 8001:8001 clearlinux/stacks-dlrs-mkl:v0.4.0 /workspace/scripts/serve.sh ie_serving model --model_path /opt/ml/resnet_V1_50 --model_name resnet50 --port 9001 --rest_port 8001

You get

standard_init_linux.go:211: exec user process caused "exec format error"

This is because the /workspace/scripts/serve.sh is missing the bangline (#!/bin/sh)

https://github.com/clearlinux/dockerfiles/blob/52b2efde27e6af41fcc2e242d22141fca0f98eaf/stacks/dlrs/mkl/scripts/serve.sh#L1

joselamego commented 5 years ago

@poussa: Thanks for your report.

Please use the following workaround to run the OVMS on your container (if you aren't already using one of your own):

docker run --rm -v /opt/models/:/opt/ml:ro -p 9001:9001 -p 8001:8001 clearlinux/stacks-dlrs-mkl:v0.4.1 /bin/bash -c "source /.bashrc && /workspace/scripts/serve.sh ie_serving model --model_path /opt/ml/resnet_V1_50 --model_name resnet50 --port 9001 --rest_port 8001"

Note that this is using the image version v0.4.1, which can be obtained with

docker pull clearlinux/stacks-dlrs-mkl:v0.4.1

We will implement an appropriate fix in the next image version.