Hi i want to mount /user/vidya/models/ to /models in vespa. but not sure how to do it.
Im using pyvespa

Here is the problem I’m facing:-

vd = VespaDocker(port=self.port, container_image='vespaengine/vespa', cfgsrv_port=cfgsrv_port, container_memory= 12 * (1024 ** 3), volumes=["/home/ubuntu/vidya/pipeline/models/:/models"])
        self.app = vd.deploy_from_disk(application_name=self.app_name, application_root=path, debug=True)

/home/ubuntu/vidya/pipeline/models/:/models –> volumns

this is what i’m getting

(search-vespa) (base) ubuntu@alphastream2:~/vidya/pipeline/Doc-Search$ python vespa_deploy.py 
Waiting for configuration server, 0/300 seconds...
Waiting for configuration server, 5/300 seconds...
Traceback (most recent call last):
  File "/home/ubuntu/vidya/pipeline/Doc-Search/vespa_deploy.py", line 271, in <module>
    obj.deploy_app_from_disk(port=gd.FIANANCE_APP_PORT, cfgsrv_port=gd.FIANANCE_APP_CFGSVR_PORT, path='/home/ubuntu/vidya/pipeline/Doc-Search/vespa_packages')
  File "/home/ubuntu/vidya/pipeline/Doc-Search/vespa_deploy.py", line 248, in deploy_app_from_disk
    self.app = vd.deploy_from_disk(application_name=self.app_name, application_root=path, debug=True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/miniconda3/envs/search-vespa/lib/python3.11/site-packages/vespa/deployment.py", line 180, in deploy_from_disk
    return self._deploy_data(ApplicationPackage(name=application_name), data, debug)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/miniconda3/envs/search-vespa/lib/python3.11/site-packages/vespa/deployment.py", line 301, in _deploy_data
    raise RuntimeError(
RuntimeError: Deployment failed, code: 400, message: {'error-code': 'INVALID_APPLICATION_PACKAGE', 'message': "Invalid application: Unable to find ONNX model 'models/reranker_model.onnx'"}

Not sure why. I have given the all the right path.

Atlest does any one have any idea about mounting a volume in vespa for models?

New contributor

DUDEKULA VIDYASAGAR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.