0

Please bear with me as I am new to docker and have never used torchserve before, so any feedback will help. I am trying to create a .mar file in an existing docker container from a model.pt file, handler file, and index to label mapping json file. I have already pulled the torchserve docker image from docker hub, and can successfully run it. I have tried mounting a local directory to the container, but the directory doesn't appear in the container. In windows command prompt I have tried:

docker run -it -v C:\Users<restofabsolutepath>:/src pytorch/torchserve:latest-cpu bash

After this command, I search the container, and cannot find the src folder or any of its contents in the container. I am on a windows machine if that makes any difference in how I should approach this.

1 Answer 1

0

By default, the Docker torchserve container starts with /home/model-server as the root folder. So you are better off mounting local volumes off that as:

docker run --rm -it -p 8080:8080 -p 8081:8081 --name mar -v $(pwd)/model-store:/home/model-server/model-store -v $(pwd)/examples:/home/model-server/examples pytorch/torchserve:latest

See step 1 listed here for more details. Hope that helps.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.