I'm afraid that there are more than 4 ways to setup an environment to follow the Plutus Pioneer Program, considering all the combinations of operating systems, virtualization options and application packaging.
The first thing to decide is if we're going to use some kind of virtualization technology to isolate the environment. In my experience this is highly recommended because:
- you avoid possible incompatibilities with your host operating system and any already installed software, specially on development systems with many package managers deployed.
- it keeps your host clean so you can easily start over from a clean state if things go wrong.
- it allows you to choose a base system that is known to work well independently from your host system.
- it creates a certain degree of independence from the physical layer (depending on the technology used), to the point where you may decide to setup the exact same environment in the cloud as you don't have the free resources needed in your local computer.
Now, you have two main options to virtualize the environment, a Docker container or a virtual machine.
The Docker option requires that, after installing the software, you run an image that someone has previously built (quick and reproducible option), or that you build it yourself using a Dockerfile. In my opinion it may make sense if someone is maintaining images for each week's environment version, with everything already compiled, aiming to save some time, otherwise a virtual machine can offer more flexibility for this use case, persisting changes without much overhead, and allowing to experiment in a more comfortable way.
The virtual machine option requires that you install a virtualization software, for example Virtualbox, to deploy a local instance, or that you deploy a cloud instance, for example an AWS EC2, and then that you choose/install your preferred operating system, and finally on top of that install the toolset required to compile the Plutus environment. This can be a bit confusing the first time if you're not used to the tools, i.e. nix, cabal, etc...
Be aware that in previous iterations we needed to weekly recompile the environment to make the code samples work, as a consequence of the Playground being under heavy development.
Fortunately the community made an effort to further document the process for a variety of scenarios, and made it available at the website:
Please consider contributing to the following repository:
There's an option that in my opinion takes the best of both worlds for this use case, which is to make use of Vagrant to get a running virtual machine but automating all the initial setup process. You can find instructions on the previous links for a Vagrant+Ubuntu setup.
I wanted to use Vagrant+NixOS for its deterministic nature and its native integration with part of the required toolset, so I developed a Vagrant file and a set of scripts to automate the setup process that can be found here:
I plan to follow this third iteration that is about to start, and I'll try to update the scripts as the course moves forward.
I hope this helps.