跳至主要内容

Make Your Container Read the Model

Overview

Deploying an edition (see Upload and Deploy) delivers the verified model file to the device. If your deploy request uses ATOMIC_SWAP_AND_RESTART_CONTAINER, WEDA also moves the file into its final location and restarts your inference container so it re-reads the file — but it only restarts the container. It does not create or mount a volume for you.

Your inference container must already be configured to mount the device's secured volume before the first deploy. This page covers that one-time container setup.

WEDA automatically creates and manages the secured volume for you as part of deployment — there is no API to provision or configure it directly. Your container connects to it as a read-only volume using the connection details your WEDA deployment provides.

Scope

The secured volume's internal management is not exposed as a public REST API in v1.1.0. Mounting it in your container's own deployment definition, as shown below, is the supported approach today.

Where the Model File Lands

Once a deployment reaches DEPLOYED, the verified file is available inside the secured volume. Use the edgeFilePath value returned in the deployment result (see Check Deployment Result) as the path within the mounted volume — it is already relative, in the form /ai-models/<modelName>/<edition>/<fileName>. Don't construct or assume any other path; the underlying mount structure is managed entirely by WEDA and may change between releases.

Mount the Volume in Your Container

Configure your container's deployment definition (Docker Compose service) to mount the secured volume as a read-only NFS volume, then load the model from <mountPath><edgeFilePath> in your inference code:

# docker-compose.yml excerpt
services:
infer-svc:
volumes:
- type: volume
source: secured-volume
target: /models

volumes:
secured-volume:
driver: local
driver_opts:
type: nfs
o: "addr=<secured-volume-ip>,vers=3,nolock,ro"
device: "<secured-volume-export-path>"

<secured-volume-ip> and <secured-volume-export-path> are fixed for your deployment — contact your WEDA administrator or Advantech support for the values to use, and reference them directly in your Compose file rather than discovering them dynamically. They do not change once provided.

Deploy this Compose file as a WEDA Container Stack so the mount configuration is managed through WEDA rather than run manually on the device.

Verify

Confirm the file is visible inside your container at its configured mount path:

docker exec <infer-svc> ls -la /models<edgeFilePath>

If the file is missing, check the deployment state before redeploying. The file is delivered to the device's secured volume, not into the container, so a missing file inside the container does not by itself mean the deployment failed.

  • If the deployment reports DEPLOYED, the file is on the device and the problem is your container's volume definition. Fix the mount; no redeployment is needed.
  • If you omitted applyCmd or set it to NOOP, the file is still in the staging directory and was never moved to its final path. Redeploy with ATOMIC_SWAP_AND_RESTART_CONTAINER.

Last updated on Aug-1, 2026 | Version 1.1.1