Skip to content

Repository files navigation

SkyLabs AI Workspace

This repository provides infrastructure for cloning and working on the various SkyLabs AI repositories (public of private), within a single workspace.

Workspace Composition

The workspace is composed by assembling separate repositories using SkyLabs' replacement for git submodules. The managed repository groups live under fmdeps/, vendored/, and bluerock/, with their configuration in dev/repos/config.mk.

Many nested repositories contain multiple OPAM packages and can be installed and used independently outside this workspace; release Docker images install those packages separately. Inside this checkout, development should normally use the composed workspace build from the workspace root so dependencies are taken from the checked-out repositories.

Getting Started

This section gives detailed instructions for setting up a local workspace. The instructions assume that the workspace is cloned in a directory that will hold potentially many copies of the workspace, some containing git work-trees.

Setting Up The Workspace

First, you need to clone the workspace repository.

mkdir -p $HOME/dev && cd $HOME/dev                # Pick a suitable directory.
git clone git@github.com:SkyLabsAI/workspace.git  # Clone the workspace.
cd workspace                                      # Move to the workspace.

Cloning Sub-Repositories

You can then optionally clone sub-repositories within it.

make clone -j          # Cloning everything (including private repos).
make clone-public -j   # Cloning only the publicly-accessible repos.
make clone-vendored -j # Cloning only the (public) vendored repositories.
make clone-fmdeps -j   # Cloning (mostly public) repos of fmdeps/.
make clone-bluerock -j # Cloning (private) repos of bluerock/ (used in CI).

Setting Up FM Dependencies

make dev-check-ver    # Check system deps.
make dev-setup        # Setup the dev environment (opam switch, ...).
make update-opam-deps # Install necessary dependencies.

Note that you might need to run either of the following commands to enable the correct development environment locally (opam switch, ...).

source dev/activate.sh  # Enable the development environment.

Building

To start building, you can run the following.

make ide-prepare        # Prepare for a minimal build.
make -j$(nproc) stage1  # Build ASTs of client projects.
dune build              # Build for installation.

If Dune fails with an error like the following, the workspace-local Rocq wrappers have not been prepared yet.

[Panic] Error: recursive invocation of "rocq-perf" as "rocq"

Run make ide-prepare from the workspace root and retry the build. This prepares the Rocq wrapper layout expected by the composed workspace build.

Sub-Repository Control

The configuration for sub-repositories is found in dev/repos/config.mk. This file controls what repos get clone in the workspace, and where. At the moment, repositories are gatherd into the followig directories:

  • fmdeps/ (all the core FM repositories),
  • bluerock/ (all the BlueRock repositories used by FM CI).

Custom Makefile targets are provided to run batch operations on repositories of the workspace, either all of them, or a group of them (corresponding to the directories listed above, and also to special groups like upstream, owned, dowstream, public, or private). Here is a list of often useful targets:

  • make show-config shows the configuration for the sub-repositories.
  • make clone initializes all the sub-repositories.
  • make fetch runs git fetch --all in all the sub-repositories.
  • make pull runs git pull --rebase in all the sub-repositories.
  • make peek runs git status in all the sub-repositories.
  • make describe shows the commit hash of each sub-repositories.

There are more, but these can be dangerous:

  • make gitclean runs git clean -xfd in all the sub-repositories.
  • make checkout-main resets all the repositories to our main branch.
  • make nuke deletes all the sub-repositories.

Similar targets are available for groups of repos. For example:

  • make clone-fmdeps only clones the sub-repos of the fmdeps/ directory.
  • make peek-fmdeps runs git status in sub-repos under fmdeps/.
  • make nuke-bluerock deletes all sub-repositories in bluerock/.
  • make peek-public runs git status in all the public repos.

Targets are also provided per-repo. For example:

  • make clone-BRiCk only clones BRiCk in fmdeps/BRiCk.
  • make nuke-bhv deletes the sub-repo in bluerock/bhv.

Worktree Support

See here for worktree support.

About

Workspace in which all the SkyLabs AI tooling can be cloned.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages