3.3. Building in a VS Code Dev Container#
We highly recommend this approach if you plan to develop custom adapters, modify the framework, or build new disk images.
The SimBricks repository is pre-configured with a Visual Studio Code Development Container that includes all required dependencies for compiling and working with SimBricks.
If you have Docker set up and the VS Code Dev Containers extension you can open SimBricks inside a devcontainer in two simple steps:
Clone the repository and open it in VS Code.
Press
Ctrl+Shift+Pand execute theDev Containers: Reopen in Containercommand to open the repository inside the container.
After this, all VS Code terminals will now automatically run commands inside the fully configured container.
3.3.1. Compiling Core Components#
To compile the core SimBricks components, run make (we recommend using -jN
to utilize multiple cores).
This step will also build simulators directly contained in the SimBricks repository. You likely also want to build at least some of the external simulators (e.g. QEMU, ns-3), for this refer to Compiling external simulators.
Note
By default, we do not build the Verilator simulation (as it takes several minutes to compile) and also skip building the RDMA proxy (as it depends on specific RDMA NIC libraries).
To enable these builds for your artifacts, set ENABLE_VERILATOR=y and
ENABLE_RDMA=y on the command line, or create a mk/local.mk file and
insert those settings there.
3.3.2. Compiling External Simulators#
To build external simulators such as gem5, QEMU, or ns-3 for your custom workflows, first ensure their corresponding submodules are initialized:
git submodule update --init
Then you can either build all external simulators at once (this may take multiple hours depending on your machine):
make -jN external
or alternatively, build them individually as needed (replace qemu with
gem5, ns-3, or femu):
make -jN sims/external/qemu/ready
3.3.3. Building Disk Images#
To generate custom disk images, use the following commands.
Note
This step requires QEMU to be built first.
Be aware that these steps can again take 10 to 45 minutes depending on your machine and whether KVM acceleration is available.
Unless you want to modify the images, you will only need to exectue this once.
To build all disk images that we provide out-of-the-box, run the following command:
make -jN build-images
Alternatively you can only build the base disk images (excluding the NOPaxos or Memcached images):
make -jN build-images-min
3.3.4. Installing the Python Orchestration Framework#
To utilize or modify the SimBricks orchestration framework, you must install its corresponding Python packages into your environment.
We highly recommend doing this by running the following command:
make symphony-dev
This command performs an “editable” install of the orchestration packages. By using an editable install, any modifications you make to the local Python source code will be immediately reflected in your runtime environment, completely eliminating the need to rebuild or reinstall the packages after every change.
Once you performed all these steps you are ready to run your first SimBricks simulation.