-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e3902f
commit 756d24d
Showing
21 changed files
with
49 additions
and
72 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Nextmv Python PyOptInterface Knapsack | ||
|
||
Example for running a Python application on the Nextmv Platform using the | ||
PyOptInterface package. We solve a knapsack Mixed Integer Programming problem. | ||
|
||
1. Install packages. | ||
|
||
```bash | ||
pip3 install -r requirements.txt | ||
``` | ||
|
||
1. Run the app. | ||
|
||
```bash | ||
python3 main.py -input input.json -output output.json -duration 30 | ||
``` | ||
|
||
## Mirror running on Nextmv Cloud locally | ||
|
||
Docker needs to be installed. | ||
|
||
To run the application in the same Docker image as the one used on Nextmv | ||
Cloud, you can use the following command: | ||
|
||
```bash | ||
cat input.json | docker run -i --rm \ | ||
-v $(pwd):/app ghcr.io/nextmv-io/runtime/pyomo:latest \ | ||
sh -c 'python3 /app/main.py' | ||
``` | ||
|
||
You can also debug the application by running it in a Dev Container. This | ||
workspace recommends to install the Dev Container extension for VSCode. If you | ||
have the extension installed, you can open the workspace in a container by | ||
using the command `Dev Containers: Reopen in Container`. | ||
|
||
## Next steps | ||
|
||
* Open `main.py` and modify the model. | ||
* Visit our [docs][docs] and [blog][blog]. Need more assistance? | ||
[Contact][contact] us! | ||
|
||
[docs]: https://docs.nextmv.io | ||
[blog]: https://www.nextmv.io/blog | ||
[contact]: https://www.nextmv.io/contact |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.