Skip to content

Deploy a model

A deployment is solver code plus data, deployed under a name. Once it exists, anyone in your company can create a project from <company>/<name> and start solving.

The server expects two trees. The solver reads ../data/ at solve time, so the same solver can run against a different dataset.

  • Directoryrun/
    • pyproject.toml the solver package’s own manifest
    • run.py
    • Directorysrc/
      • Directorysolver/
        • **/*.py
  • Directorydata/
    • instances.json
    • distances.csv

checkDeployment validates this server-side and reports what is missing.

aura deploy reads a [tool.aura.deployment.<name>] table, normally in the model folder’s own pyproject.toml — the file that lands as run/pyproject.toml. Build backends ignore unknown tool tables, so the manifest travels with the artifact without affecting it.

pyproject.toml
[tool.aura.deployment.vrp]
model_folder = "." # uploaded under run/ (default ".")
data_folder = "../define/data" # uploaded under data/ (required)
include = ["pyproject.toml", "run.py", "src/solver/**"]
data_include = ["**"]
exclude = ["notes/**", "personal_infos.txt"]
Terminal window
aura init # scaffold the section above
aura deploy --dry-run # print exactly what would upload, change nothing
aura deploy # upload
aura deployment check # server-side run contract

Several deployments may live in one pyproject.toml; aura deploy <name> picks one, and the name is optional when only one is defined. aura deploy searches upward from the current directory for a pyproject.toml carrying a [tool.aura] table, or takes --config <path>.

include and data_include are glob lists relative to their folder; exclude applies to both and wins over include.

include = ["pyproject.toml", "run.py", "README.md", "src/solver/**"]
data_include = ["*.csv", "instances/**"]
exclude = ["**/scratch/**", "notes.md"]

Built-in excludes always apply on top: dot-prefixed files and directories (.git, .venv, .env, …), __pycache__, node_modules, dist, venv, *.pyc. The server additionally rejects dot-prefixed and executable paths.

Preview what would upload:

Terminal window
aura deploy --dry-run

Remote run/ and data/ are made to match your local folders: after the uploads, remote files no longer present locally are removed, so renames and deletions leave nothing stale. If an upload fails, the sync stops without pruning.

  1. Check it is runnable:

    Terminal window
    aura deployment check vrp
  2. Create a project from the handle, <company>/<name>:

    Terminal window
    aura project create acme/vrp --name "vrp demo"
  3. Chat with it.