Autonomy Lab's monorepo
selfdrive
is a monorepo consisting of various Autonomy Lab projects
written in different languages with various dependencies. To avoid
dependency hell, we've opted to utilize the Nix package manager to
handle dependency resolution along with direnv to automate this
process.
Head over to https://nixos.org/download and proceed with the
installation for your platform. Once the process is complete, you'll
need to enable Nix flakes by adding the following to
~/.config/nix/nix.conf
:
experimental-features = flakes nix-command
You'll also need to enable the unstable channel if you'd like to install the latest versions of software:
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
$ nix-channel --update
The easiest way to install direnv is through nix-env
:
$ nix-env -iA nixpkgs.direnv
Optionally, feel free to use your system's package manager to go through with the installation of direnv.
Once installed, hook direnv into your shell.
Make sure that you've installed Git and Git-LFS before cloning.
Clone the repo:
$ git clone [email protected]:CooperUnion/selfdrive.git
Once cloned, make sure to initialize all the submodules:
$ git submodule update --init --recursive
We also recommend to configure Git to automatically update submodules recursively:
$ git config --global submodule.recurse true
Once everything's installed and set up, you can pass over the bootstrap process to direnv:
$ direnv allow
If everything worked, you should be able to run SCons successfully:
$ scons --help
Copyright (C) 2021--2024 Autonomy Lab
Distributed under the GPLv3 only.