Deploy (push) an application¶
Info
Learn the concepts and fundamentals of deploying applications in the Explanation page.
Deploying applications to Nextmv Cloud allows you to take full advantage of the Nextmv Platform. Once an application has been pushed, you can execute remote runs, and perform experiments and tests.
Push an application to Nextmv Cloud using the nextmv cloud app
push command. Stand in the same location as the app's root
directory, this is, where the app.yaml manifest is located.
💿 Starting build for Nextmv application jumping-hare.
🐍 Bundling Python dependencies.
⏫ 32/34 compressed dependencies found in cache.
🐇 Downloading and compressing 2 dependencies from package index.
📋 Copying files listed in app.yaml manifest.
💾 Compressing application into tarball.
🛠 Appending application files.
📦 Packaged application (2 app files, 55.63 MiB with dependencies).
🌟 Pushing to application: jumping-hare.
💥 Successfully pushed to application: jumping-hare.
{
"app_id": "jumping-hare",
"endpoint": "https://api.cloud.nextmv.io",
"instance_url": "v1/applications/jumping-hare/runs?instance_id=latest"
}
You don't have to be standing in the same location as the app's root dir if you
don't want to. You can use the --app-dir option to specify a different path
to the app's root directory. Additionally, you may use the --manifest option
to specify an entirely different manifest file.
The CLI will prompt you to create a version and, optionally. either create an instance or update an existing one.
Tip
It is a best practice to create a version for every push to Nextmv Cloud. This allows you to keep track of changes made to the decision model.
If you don't want to be prompted, which is especially useful in CI/CD environments, you can use the following options:
--version-yes/--version-no: accept or decline creating a new version.--version-id: specify a version ID to create. Activates--version-yes.--create-instance-id: link the newly created version to a new instance with this ID. Skips prompt to provide an instance ID. Activates--version-yes.--update-instance-id: link the newly created version to an existing instance with this ID. Skips prompt to provide an instance ID. Activates--version-yes.
Skips the version prompt and create a new version with a random ID. You will be prompted to create or update an instance.
💿 Starting build for Nextmv application jumping-hare.
🐍 Bundling Python dependencies.
⏫ 34/34 compressed dependencies found in cache.
📋 Copying files listed in app.yaml manifest.
💾 Compressing application into tarball.
🛠 Appending application files.
📦 Packaged application (2 app files, 55.63 MiB with dependencies).
🌟 Pushing to application: jumping-hare.
💥 Successfully pushed to application: jumping-hare.
{
"app_id": "jumping-hare",
"endpoint": "https://api.cloud.nextmv.io",
"instance_url": "v1/applications/jumping-hare/runs?instance_id=latest"
}
⏳ Creating a new version...
✅ New version version-oqvnykx8 created for application jumping-hare.
Creates a new instance with the provided ID and links it to the newly created version. Skips all prompts.
💿 Starting build for Nextmv application jumping-hare.
🐍 Bundling Python dependencies.
⏫ 34/34 compressed dependencies found in cache.
📋 Copying files listed in app.yaml manifest.
💾 Compressing application into tarball.
🛠 Appending application files.
📦 Packaged application (2 app files, 55.63 MiB with dependencies).
🌟 Pushing to application: jumping-hare.
💥 Successfully pushed to application: jumping-hare.
{
"app_id": "jumping-hare",
"endpoint": "https://api.cloud.nextmv.io",
"instance_url": "v1/applications/jumping-hare/runs?instance_id=latest"
}
💡 Used option --create-instance-id, which requires a version. A new version will be created.
⏳ Creating a new version...
✅ New version version-ep0i27ll created for application jumping-hare.
💡 Used option --create-instance-id to link version to new instance.
⏳ Creating a new instance with ID prod...
✅ New instance prod created using version version-ep0i27ll for application jumping-hare.
Updates an existing instance with the provided ID and links it to the newly created version. Skips all prompts.
💿 Starting build for Nextmv application jumping-hare.
🐍 Bundling Python dependencies.
⏫ 34/34 compressed dependencies found in cache.
📋 Copying files listed in app.yaml manifest.
💾 Compressing application into tarball.
🛠 Appending application files.
📦 Packaged application (2 app files, 55.63 MiB with dependencies).
🌟 Pushing to application: jumping-hare.
💥 Successfully pushed to application: jumping-hare.
{
"app_id": "jumping-hare",
"endpoint": "https://api.cloud.nextmv.io",
"instance_url": "v1/applications/jumping-hare/runs?instance_id=latest"
}
💡 Used option --update-instance-id, which requires a version. A new version will be created.
⏳ Creating a new version...
✅ New version version-6z1nt9ve created for application jumping-hare.
💡 Used option --update-instance-id to link version to existing instance.
⏳ Updating instance prod to use version version-6z1nt9ve...
✅ Instance prod updated to use version version-6z1nt9ve for application jumping-hare.
Cache for Python dependencies¶
If you are working with a Python application, the CLI will download and bundle
all the dependencies that are specified in the python
section of the app.yaml. To avoid re-downloading and
re-compressing dependencies every time you push, the CLI caches the compressed
dependencies.
The default behavior when pushing is to use the cache for dependencies. If you
want to skip the cache, you can use the --no-cache option.
💿 Starting build for Nextmv application jumping-hare.
🐍 Bundling Python dependencies - caching disabled.
🐇 Downloading and compressing 34 dependencies from package index.
📋 Copying files listed in app.yaml manifest.
💾 Compressing application into tarball.
🛠 Appending application files.
📦 Packaged application (2 app files, 55.62 MiB with dependencies).
🌟 Pushing to application: jumping-hare.
💥 Successfully pushed to application: jumping-hare.
{
"app_id": "jumping-hare",
"endpoint": "https://api.cloud.nextmv.io",
"instance_url": "v1/applications/jumping-hare/runs?instance_id=latest"
}
You can manage the cache with the nextmv cache command tree. The
policy used for the cache is LRU (Least Recently Used) eviction. The number and
size of cached dependencies is limited to avoid using too much disk space.
Get cache information¶
Use the nextmv cache get command to retrieve information about
the cache, such as the size of the cache and the number of cached dependencies.
✅ Cache information retrieved successfully.
{
"num_dependencies": 254,
"total_size": "1.41 GiB",
"dependencies": [
{
"key": "f38bab26ffb0c90c1a9de0d59fb32d7d9f9a350b9f029952112ba04e6c10cd64",
"name": "xyzservices",
"version": "2026.3.0",
"last_used_at": "2026-07-22T22:31:56.633763+00:00",
"python_version": "3.11",
"platform": "aarch64-manylinux_2_34",
"size": "85.17 KiB"
},
...
{
"key": "f2603a630386294ba40f8a8d2435ecda4cfe771cd1518f313435d2c309b0c35d",
"name": "certifi",
"version": "2026.4.22",
"last_used_at": "2026-05-14T21:25:22.489675+00:00",
"python_version": "3.11",
"platform": "aarch64-unknown-linux-gnu",
"size": "132.27 KiB"
}
]
}
Clear the cache¶
Warning
Clearing the cache will remove all cached dependencies and it is a permanent action.
Use the nextmv cache delete command to clear the cache.