This repository provides infrastructure for cloning and working on the various SkyLabs AI repositories (public of private), within a single workspace.
This repository also hosts infrastructure for CI and docker images.
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, in the form of git work-trees.
First, you need to clone the workspace repository.
mkdir -p $HOME/dev && cd $HOME/dev # Pick a suitable directory.
git clone [email protected]:SkylabsAI/workspace.git # Clone the workspace.
cd workspace # Move to the workspace.You can then optionally clone sub-repositories within it.
make fmdeps-clone -k -j # Cloning (mostly public) FM sub-repos.
make psi-clone -j # Cloning (private) psi sub-repos.
make bluerock-clone -j # Cloning (private) BlueRock sub-repos, mostly for CI.make dev-check-ver # Check system deps.
make dev-setup # Sets up a suitable opam switch / Python venv.
make update-br-fm-deps # Install necessary dependencies.Note that you might need to run either of the following commands to enable the correct opam switch and Python environment locally.
source dev/activate.sh # Enable the development environment.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.The following folders gather sub-repositories:
fmdeps(all the core FM repositories),psi(all other SkyLabs AI repositories),bluerock(all the BlueRock repositories used by FM CI).
These directories contain a file called config.mk, which defines set set of
repositories to be cloned. Special Makefile targets can be used to run batch
operations on all such repositories. Note that different targets are used for
different directories, and they are all prefixed by the directory name.
Available Makefile targets for the fmdeps directory are:
make fmdeps-show-configshows the configuration for the sub-repositories.make fmdeps-cloneinitializes all the sub-repositories.make fmdeps-fetchrunsgit fetch --allin all the sub-repositories.make fmdeps-pullrunsgit pull --rebasein all the sub-repositories.make fmdeps-peekrunsgit statusin all the sub-repositories.make fmdeps-describeshows the commit hash of each sub-repositories.
There are more, but these can be dangerous:
make fmdeps-gitcleanrunsgit clean -xfdin all the sub-repositories.make fmdeps-checkout-mainresets all the repositories to our main branch.
Similar targets are available for other sub-repository directories.
For worktree support, consult ./dev/worktrees/README-worktree.md.