{"id":26005395,"url":"https://github.com/precice/vm","last_synced_at":"2025-03-05T20:53:53.374Z","repository":{"id":42084077,"uuid":"303345535","full_name":"precice/vm","owner":"precice","description":"Vagrant box with preCICE and examples preinstalled","archived":false,"fork":false,"pushed_at":"2024-04-29T09:52:00.000Z","size":190,"stargazers_count":5,"open_issues_count":15,"forks_count":4,"subscribers_count":6,"default_branch":"develop","last_synced_at":"2024-04-30T10:05:23.139Z","etag":null,"topics":["demo","precice","teaching","training","vagrant","vagrantfile"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/precice.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"https://precice.org/community-support-precice"}},"created_at":"2020-10-12T09:41:41.000Z","updated_at":"2024-04-30T10:05:23.140Z","dependencies_parsed_at":"2024-04-29T10:05:55.042Z","dependency_job_id":null,"html_url":"https://github.com/precice/vm","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Fvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Fvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Fvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Fvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/precice","download_url":"https://codeload.github.com/precice/vm/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242103944,"owners_count":20072368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["demo","precice","teaching","training","vagrant","vagrantfile"],"created_at":"2025-03-05T20:53:52.820Z","updated_at":"2025-03-05T20:53:53.363Z","avatar_url":"https://github.com/precice.png","language":"Shell","funding_links":["https://precice.org/community-support-precice"],"categories":[],"sub_categories":[],"readme":"# Vagrant box for preCICE, with examples preinstalled\n\n[Vagrant](https://www.vagrantup.com/) files to prepare a Virtual Machine image for [preCICE](https://www.precice.org/), mainly for demo and teaching purposes.\n\n## What does this do?\n\nVagrant pulls an Ubuntu 20.04 \"base box\" and asks e.g. VirtualBox to start a virtual machine.\nIt then installs basic tools (such as a desktop environment), a preCICE release,\nseveral solvers and adapters, as well as example and tutorial files.\n\nReady-to-use boxes are available on [Vagrant Cloud](https://app.vagrantup.com/precice/boxes/precice-vm).\n\n## How to use this?\n\n**Note:** If you only want to directly get a pre-built box, look at the [documentation](https://www.precice.org/installation-vm.html).\n\n1. Get a Virtual Machine provider, such as [VirtualBox](https://www.virtualbox.org/)\n2. Get [Vagrant](https://www.vagrantup.com/)\n3. Go to the root folder of this repository and start with `vagrant up`.\n4. Be patient. Vagrant will now setup your virtual machine. You don't have to do anything and your terminal will be very busy.\n5. After the provisioning finishes, restart the machine with `vagrant reload` to get a full GUI\n\nYou can afterwards also see and manage the produced VM in VirtualBox.\n\nA few things you may need:\n\n- The username and password are `vagrant`/`vagrant`\n- The keyboard layout is US English (QWERTY). You can change this in [`install-basics.sh`](./provisioning/install-basics.sh) or through the keyboard setting shortcut on `~/Desktop`.\n- Find scripts to install additional software on `~/Desktop/shared`.\n\n### What else can I do?\n\n- Suspend and resume the machine: `vagrant suspend`, `vagrant resume`\n- Turn off or destroy the machine: `vagrant halt`, `vagrant destroy`\n- Update the machine after you change the related scripts: `vagrant provision`\n- SSH into the machine: `vagrant ssh`\n- Package your already provisioned box (e.g. to reduce the starting time on another machine): `vagrant package --base \"preCICE-VM\" --output preCICE.box`\n- Change the number of cores and the allocated memory: edit `vb.cpus` and `vb.memory` in the `Vagrantfile`.\n- Share files between host and guest system: the guest system's `/vagrant/` directory reflects the directory of the `Vagrantfile`.\n\n## What is included?\n\nThis box is based on the ~~[generic/ubuntu2004](https://github.com/lavabit/robox/tree/master/scripts/ubuntu2004)~~ [bento/ubuntu-20.04](https://github.com/chef/bento) base box and installs:\n\n- Xubuntu-core (Xfce desktop environment) and related tools\n- VirtualBox guest additions\n- Terminator (a nice split-window terminal emulator, find it in `Applications \u003e System`)\n- Git, CMake, ccmake\n- Editors: nano, vim, gedit\n- Diff viewer: meld\n- preCICE latest from the master branch (built in release-with-debug-info mode)\n- preCICE config visualizer with its GUI (master)\n- preCICE Python bindings (PIP)\n- preCICE Julia bindings (Pkg)\n- preCICE Rust bindings (Cargo)\n- preCICE FMI Runner (PIP)\n- preCICE Micro Manager (PIP)\n- OpenFOAM v2312 and the OpenFOAM-preCICE adapter (master)\n- deal.II 9.3 from the official backports and the deal.II-preCICE adapter (master)\n- CalculiX 2.20 from source and the CalculiX-preCICE adapter (master)\n- FEniCS latest from the FEniCS PPA and the FEniCS-preCICE adapter (PIP)\n- SU2 7.5.1 and the SU2-preCICE adapter (master)\n- code_aster 14.6 and the code_aster-preCICE adapter (master)\n- DUNE 2.9.1 and the experimental DUNE-preCICE adapter (main)\n- DuMuX 3.8 and the DuMuX-preCICE adapter (v2.0.0)\n- ASTE (master)\n- Paraview from APT\n- Gnuplot\n\nIt then adds to the `/home/vagrant/`:\n\n- The preCICE examples (solverdummies), including a copy of the Python solverdummy.\n- The preCICE tutorials from the `precice/tutorials`\n\nThe adapter repositories remain in `/home/vagrant/`.\nIt also adds a few shortcuts on the Desktop (see `post-install.sh`).\nAt the end, it cleans up all object files and the APT cache (see `cleanup.sh`).\n\n## Troubleshooting\n\n### This does not seem to work on my machine\n\nEven though most hardware supports virtualization, your CPU may not or you may need to enable it in your BIOS/UEFI settings.\n\n### Provisioning fails during an APT update / install\n\nThe most common reason can be that one of the third-party APT repositories\n(such as the repository of OpenFOAM on SourceForge) do not respond.\nUsually running again (e.g. with `vagrant up --provision`) helps.\n\n### There is no GUI\n\nIn case you killed the session before provisioning finished, the setup of your VM might be incomplete. You might still be able to interact with the VM without the GUI. In that case, run `vagrant up --provision`.\n\n## Testing before publishing\n\nWe now have a GitHub action that can build the Vagrant box. This workflow only runs for pull requests that are marked as \"ready for review\" (i.e. not \"draft\"), as it takes significant time to complete (~1.5h). If you already submitted a normal PR but the workflow is not triggered, you can manually trigger it from the \"Actions\" tab.\n\nThe workflow uploads the resulting box as an artifact and it also prints its SHA256 checksum before that. Download the job artifact and unzip it. Then run add the box to Vagrant:\n\n```bash\nvagrant box add test-box precice-vagrant-box/preCICE.box \n```\n\nYou can then start a VM by going into an empty directory and executing:\n\n```bash\nvagrant init test-box\nvagrant up\n```\n\nAfterwards, you probably want to destroy everything to save storage space:\n\n```bash\nvagrant destroy\nvagrant box remove test-box\n```\n\n## KVM support\n\nIf you require a more responsive experience, lower overhead, or exotic features such as GPU pass through, then the `libvirt` vagrant box is for you.\nThis allows you to run the vagrant box via libvirt and QEMU as a Kernerl Virtual Machine (KVM).\n\n\u003e Note\n\u003e The libvirt variant does not work with the `bento/ubuntu-20.04` base image, but also the VirtualBox variant does not at the moment work with the `generic/ubuntu2004` image.\n\u003e Change the base image in the beginning of the Vagrantfile if you need this feature.\n\u003e See https://github.com/precice/vm/issues/83 for details.\n\nTo use this box, first install the vagrant plugin `vagrant-libvirt` following the [official installation instructions](https://github.com/vagrant-libvirt/vagrant-libvirt#installation).\nThen you follow the normal usage instructions above, but you need to tell vagrant to use the `libvirt` box by passing one additional option:\n```\nvagrant up --provider=libvirt\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprecice%2Fvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprecice%2Fvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprecice%2Fvm/lists"}