awslabs / multi-model-server

Multi Model Server is a tool for serving neural net models for inference
Apache License 2.0
995 stars 231 forks source link

Specifying model_path as S3 bucket URI while starting the server throws error #889

Closed sakethsaxena closed 1 year ago

sakethsaxena commented 4 years ago

Hi,

I am trying to deploy a model for which I have the .mar file stored at an S3 location, My usage is as follows:

mxnet-model-server --start --models test=s3://projects/mms-test/test.mar

For which, I get the following error: --model-store is required to load model locally.

According to the docs model path is expected to take an s3 link.

I also looked into the code and it only looks for https links.

vdantu commented 4 years ago

@sakethsaxena : You are right. You would have to give a http(s) link. In other words, your S3 link should be an https link and not an s3:// link. AFAIK, MMS only supports public buckets as of now. Else, the model needs to be embedded in the container/host running MMS. Docs need to be modified. This is used also when downloading the model . Code reference

sakethsaxena commented 4 years ago

@vdantu Thanks! It would help greatly, if there was support for s3:// links. Is that anywhere in the near future?

frankfliu commented 4 years ago

@sakethsaxena s3:// is not an official protocol that supported by java. It's a pseudo protocol used by aws cli. And it usually requires aws sigv4 authentication. It's not likely MMS will support s3:// protocol in short term. It's possible to add URL protocol handler as a plugin to support s3:// link. But that doesn't seem provide much value.

Can you elaborate any reason you prefer s3:// instead of https://?

sakethsaxena commented 4 years ago

As per my understanding, it is more secure to use an S3 URI because of the authentication. Because using a https:// URL would make the s3 bucket accessible, without any authentication.

frankfliu commented 4 years ago

@sakethsaxena MMS doesn't support authentication. Adding authentications are non-trivial work, especially there are too many authentication scheme.

For onetime authentication, you can use pre-signed URL with https. But for full authentication support, you have to implement a plugin.