From dd1ade816ee6ef4d00ba2dbc91039f1c7ba14c73 Mon Sep 17 00:00:00 2001 From: Victor Dibia Date: Mon, 3 Mar 2025 12:39:25 -0800 Subject: [PATCH] Add Git LFS Note to AGS Readme (#5798) ## Why are these changes needed? - AGS contains image files which are required for local build /dev - These files are stored using git lfs which needs to be run before the files are downloaded - This PR adds a reminder to the AGS readme to run `git lfs checkout` after installing git lfs to download the image files ## Related issue number Close #3418 ## Checks - [ ] I've included any doc changes needed for . See to build and test documentation locally. - [ ] I've added tests (if relevant) corresponding to the changes introduced in this PR. - [ ] I've made sure all auto checks have passed. --- .../.devcontainer/post-create-command.sh | 8 +- python/packages/autogen-studio/README.md | 76 ++++++++++++++----- 2 files changed, 62 insertions(+), 22 deletions(-) diff --git a/python/packages/autogen-studio/.devcontainer/post-create-command.sh b/python/packages/autogen-studio/.devcontainer/post-create-command.sh index bf9d1433e8..e42189a8aa 100644 --- a/python/packages/autogen-studio/.devcontainer/post-create-command.sh +++ b/python/packages/autogen-studio/.devcontainer/post-create-command.sh @@ -6,7 +6,13 @@ mkdir -p frontend/node_modules # Change ownership of node_modules to vscode user # This prevents permission issues when installing packages -sudo chown vscode frontend/node_modules +sudo chown vscode frontend/node_modules + +# Initialize git-lfs and fetch/checkout LFS files +git lfs install +git lfs fetch --all +git lfs checkout + pip install --upgrade pip gunicorn diff --git a/python/packages/autogen-studio/README.md b/python/packages/autogen-studio/README.md index b9809a55bd..75393d467a 100644 --- a/python/packages/autogen-studio/README.md +++ b/python/packages/autogen-studio/README.md @@ -39,35 +39,69 @@ pip install -U autogenstudio _Note: This approach requires some familiarity with building interfaces in React._ +### Important: Git LFS Requirement + +AutoGen Studio uses Git Large File Storage (LFS) for managing image and other large files. If you clone the repository without git-lfs, you'll encounter build errors related to image formats. + +**Before cloning the repository:** + +1. Install git-lfs: + + ```bash + # On Debian/Ubuntu + apt-get install git-lfs + + # On macOS with Homebrew + brew install git-lfs + + # On Windows with Chocolatey + choco install git-lfs + ``` + +2. Set up git-lfs: + ```bash + git lfs install + ``` + +**If you've already cloned the repository:** + +```bash +git lfs install +git lfs fetch --all +git lfs checkout # downloads all missing image files to the working directory +``` + +This setup is handled automatically if you use the dev container method of installation. + You have two options for installing from source: manually or using a dev container. #### A) Install from source manually - 1. Ensure you have Python 3.10+ and Node.js (version above 14.15.0) installed. - 2. Clone the AutoGen Studio repository and install its Python dependencies using `pip install -e .` - 3. Navigate to the `python/packages/autogen-studio/frontend` directory, install the dependencies, and build the UI: +1. Ensure you have Python 3.10+ and Node.js (version above 14.15.0) installed. +2. Clone the AutoGen Studio repository and install its Python dependencies using `pip install -e .` +3. Navigate to the `python/packages/autogen-studio/frontend` directory, install the dependencies, and build the UI: - ```bash - npm install -g gatsby-cli - npm install --global yarn - cd frontend - yarn install - yarn build - # Windows users may need alternative commands to build the frontend: - gatsby clean && rmdir /s /q ..\\autogenstudio\\web\\ui 2>nul & (set \"PREFIX_PATH_VALUE=\" || ver>nul) && gatsby build --prefix-paths && xcopy /E /I /Y public ..\\autogenstudio\\web\\ui - ``` + ```bash + npm install -g gatsby-cli + npm install --global yarn + cd frontend + yarn install + yarn build + # Windows users may need alternative commands to build the frontend: + gatsby clean && rmdir /s /q ..\\autogenstudio\\web\\ui 2>nul & (set \"PREFIX_PATH_VALUE=\" || ver>nul) && gatsby build --prefix-paths && xcopy /E /I /Y public ..\\autogenstudio\\web\\ui + ``` -#### B) Install from source using a dev container +#### B) Install from source using a dev container - 1. Follow the [Dev Containers tutorial](https://code.visualstudio.com/docs/devcontainers/tutorial) to install VS Code, Docker and relevant extensions. - 2. Clone the AutoGen Studio repository. - 3. Open `python/packages/autogen-studio/`in VS Code. Click the blue button in bottom the corner or press F1 and select _"Dev Containers: Reopen in Container"_. - 4. Build the UI: +1. Follow the [Dev Containers tutorial](https://code.visualstudio.com/docs/devcontainers/tutorial) to install VS Code, Docker and relevant extensions. +2. Clone the AutoGen Studio repository. +3. Open `python/packages/autogen-studio/`in VS Code. Click the blue button in bottom the corner or press F1 and select _"Dev Containers: Reopen in Container"_. +4. Build the UI: - ```bash - cd frontend - yarn build - ``` + ```bash + cd frontend + yarn build + ``` ### Running the Application