Prerequisites
Stay organized with collections
Save and categorize content based on your preferences.
Before you can start working on your first simulator, there are a few things
you need to do.
Install Bazel
MPACT-Sim uses the Bazel build system version 6.1.1,
so in order to work through the tutorials, you need to install Bazel. The
easiest way to install and manage bazel is to install
Bazelisk, which is a wrapper for
Bazel written in Go. Installation instructions are provided at its
github site.
Install Git
The MPACT-Sim infrastructure and tutorials is hosted on github.com, so a working
installation of git is required. Any reasonable version
of git should work, so choose the one that is suitable for your system.
If you don't already have git, and you are on linux, you you can usually
install git from the command line as follows:
$ sudo apt-get update
$ sudo apt-get install git
On other systems you can download an installer from git
downloads.
Download MPACT-Sim tutorials repository
All the code needed for these tutorials are contained in the github
mpact-sim-codelabs repository.
Clone this repository using the command: git clone
https://github.com/google/mpact-sim-codelabs
.
To verify that all is working properly, change to the mpact-sim-codelabs
directory and type in the command bazel build ...:all
. This will download all
required dependencies and build every target. The first time around this will
take a few minutes, but the results are cached, and subsequent builds will
finish much more quickly. The command will print out progress, including
DEBUG messages and a couple of compiler warnings. The last part of the output
should look similar to:
INFO: Elapsed time: 308.268s, Critical Path: 279.57s
INFO: 991 processes: 314 internal, 677 linux-sandbox.
INFO: Build completed successfully, 991 total actions
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-26 UTC."],[[["\u003cp\u003eBefore starting, ensure Bazel version 6.1.1 is installed, preferably using Bazelisk.\u003c/p\u003e\n"],["\u003cp\u003eA working installation of Git is necessary to access the MPACT-Sim infrastructure and tutorials.\u003c/p\u003e\n"],["\u003cp\u003eDownload the MPACT-Sim tutorials repository from GitHub using \u003ccode\u003egit clone https://github.com/google/mpact-sim-codelabs\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eVerify the setup by running \u003ccode\u003ebazel build ...:all\u003c/code\u003e within the \u003ccode\u003empact-sim-codelabs\u003c/code\u003e directory, which will build all targets and download dependencies.\u003c/p\u003e\n"]]],["To prepare for the simulator tutorials, install Bazel (version 6.1.1), preferably using Bazelisk. Install Git, compatible with your system, for accessing the GitHub-hosted resources. Download the `mpact-sim-codelabs` repository via `git clone https://github.com/google/mpact-sim-codelabs`. Navigate to the cloned directory and verify setup with `bazel build ...:all`, which downloads dependencies and builds all targets. The final output should display successful completion with a summary of processes.\n"],null,["# Prerequisites\n\nBefore you can start working on your first simulator, there are a few things\nyou need to do.\n\nInstall Bazel\n-------------\n\nMPACT-Sim uses the [Bazel](https://bazel.build) build system version 6.1.1,\nso in order to work through the tutorials, you need to install Bazel. The\neasiest way to install and manage bazel is to install\n[Bazelisk](https://github.com/bazelbuild/bazelisk), which is a wrapper for\nBazel written in Go. Installation instructions are provided at its\n[github site](https://github.com/bazelbuild/bazelisk).\n\nInstall Git\n-----------\n\nThe MPACT-Sim infrastructure and tutorials is hosted on github.com, so a working\ninstallation of [git](https://git-scm.com) is required. Any reasonable version\nof git should work, so choose the one that is suitable for your system.\n\nIf you don't already have git, and you are on linux, you you can usually\ninstall git from the command line as follows: \n\n $ sudo apt-get update\n $ sudo apt-get install git\n\nOn other systems you can download an installer from [git\ndownloads](http://git-scm.com/downloads).\n\nDownload MPACT-Sim tutorials repository\n---------------------------------------\n\nAll the code needed for these tutorials are contained in the github\n[mpact-sim-codelabs](https://github.com/google/mpact-sim-codelabs) repository.\nClone this repository using the command: `git clone\nhttps://github.com/google/mpact-sim-codelabs`.\n\nTo verify that all is working properly, change to the mpact-sim-codelabs\ndirectory and type in the command `bazel build ...:all`. This will download all\nrequired dependencies and build every target. The first time around this will\ntake a few minutes, but the results are cached, and subsequent builds will\nfinish much more quickly. The command will print out progress, including\nDEBUG messages and a couple of compiler warnings. The last part of the output\nshould look similar to: \n\n INFO: Elapsed time: 308.268s, Critical Path: 279.57s\n INFO: 991 processes: 314 internal, 677 linux-sandbox.\n INFO: Build completed successfully, 991 total actions"]]