Local Development Environment for Fabric using Ubuntu LTS on WSL
Although I was able to set Fabric up with WSL fast, I faced difficulties connecting it to Ollama which was being hosted locally on my machine. Moreover, it introduced an additional layer of friction when interacting with the software, and in all honesty, Unless the web server experience is comparable to the CLI experience, WSL might be a high barrier to actually interact with it in daily computer use.
Fabric AI Made Easy - Direct Installation on (Windows)
Setting Up a Development Environment for the Fabric Project
This document outlines the steps taken to set up a development environment for the Fabric project using Ubuntu 22.04 LTS on Windows Subsystem for Linux (WSL).
Prerequisites
- Windows Subsystem for Linux (WSL) with Ubuntu 22.04 LTS installed
Step 1: Update and Upgrade Packages
First, update and upgrade the existing packages to ensure the system is up to date.
sudo apt update -y
sudo apt upgrade -y
Step 2: Install Required Packages
Install the necessary packages, including git
, python3
, python3-pip
, and python3-venv
.
sudo apt install git python3 python3-pip python3-venv -y
Step 3: Clone the Fabric Repository
Clone the Fabric repository from GitHub.
git clone https://github.com/danielmiessler/fabric.git
cd fabric
Step 4: Install Pipx
Install pipx
using pip
with the --break-system-packages
flag to allow installation despite potential conflicts with system-managed packages.
python3 -m pip install --user --break-system-packages pipx
Step 5: Install Numpy and Chroma-hnswlib
Use pipx
to install numpy
and chroma-hnswlib
with its dependencies.
pipx install numpy
python3 -m pipx install chroma-hnswlib --include-deps
Step 6: Install the Fabric Package
Finally, install the Fabric package from the current directory using pipx
.
pipx install .
After completing these steps, you should have a working development environment for the Fabric project. The installed packages and dependencies will be managed by pipx
, ensuring a clean and isolated environment for your project.
Note: If you encounter any issues with the PATH
environment variable, you can either run pipx ensurepath
to automatically add the necessary directory to your PATH
, or manually modify your PATH
in your shell's configuration file (e.g., ~/.bashrc
). For example:
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc
source ~/.bashrc
to load in to the VM
wsl -d Ubuntu-24.04
cd ~/fabric