Skip to content

Commit

Permalink
[doc]: Improve README.md
Browse files Browse the repository at this point in the history
- Running "sudo pip install" can be OK in a CI but generates a clear
  warning. It is strongly disadvised to run it in a user or a production
  environment because it can  break the host packages system.
  "pip install --user" or venv are usually prefered in most situations.
- Nested virtualization support is not always enough to build OVS image
  inside a VM. The full KVM interface must be exposed, what may require
  extra configuration such as the KVM paravirtualization in VirtualBox.
- On the recommended version of Ubuntu (20.0.4), installing docker CE
  with the given process does not remove docker from snap
  when a previous installation of the distribution package docker.io
  was already present in the system.
  Using docker through snap currently triggers a bug during the SONiC
  build process.
https://stackoverflow.com/questions/52526219/docker-mkdir-read-only-file-system

Signed-off-by: Guillaume Lambert <[email protected]>
  • Loading branch information
guillaumelambert authored and lguohan committed Dec 15, 2022
1 parent 14a5ec7 commit 19f7ba0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ Any server can be a build image server as long as it has:
* 300G of free disk space
* KVM Virtualization Support.
> Note: If you are in a VM, make sure you have support for nested virtualization.
> Some cases (e.g. building OVS image) also requires extra configuration options to expose the full KVM interface to the VM (e.g. [the KVM paravirtualization support on VirtualBox](https://www.virtualbox.org/manual/ch10.html#gimproviders)).
A good choice of OS for building SONiC is currently Ubuntu 20.04.

Expand All @@ -95,13 +96,17 @@ A good choice of OS for building SONiC is currently Ubuntu 20.04.

```
sudo apt install -y python3-pip
sudo pip3 install j2cli
pip3 install --user j2cli
```

* Install [Docker](https://docs.docker.com/engine/install/) and configure your system to allow running the 'docker' command without 'sudo':
* Add current user to the docker group: `sudo gpasswd -a ${USER} docker`
* Log out and log back in so that your group membership is re-evaluated

> Note: If a previous installation of Docker using snap was present on the system, remove it and also remove docker from snap before reinstallating docker.
This will avoid [known bugs that falsely report read-only filesystems issues](https://stackoverflow.com/questions/52526219/docker-mkdir-read-only-file-system)
during the build process.

## Clone the repository with all the git submodules

To clone the code repository recursively:
Expand Down Expand Up @@ -129,7 +134,7 @@ To build SONiC installer image and docker images, run the following commands:

# Build SONiC image with 4 jobs in parallel.
# Note: You can set this higher, but 4 is a good number for most cases
# and is well-tested.
# and is well-tested.
make SONIC_BUILD_JOBS=4 all

The supported ASIC vendors are:
Expand Down

0 comments on commit 19f7ba0

Please sign in to comment.