Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions .meta/mast/env_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,26 @@ else
log_warn "Skipping monarch torch import hack (monarch may not be installed yet)"
fi

# Step 4: Install forge package
log_info "Step 4: Installing forge package..."
# Step 4: Check for existing build directory and warn user
log_info "Step 4: Checking for existing build directory..."
if [ -d "build" ]; then
log_warn "Detected existing build/ directory at: $(pwd)/build"
log_warn "This directory may contain artifacts from a previous pip installation"
log_warn "that could interfere with the current installation."
log_warn "If you encounter issues, manually remove it with: rm -rf build"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the risk of always deleting it all? lol

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk lol

echo ""
read -p "$(echo -e ${YELLOW}Do you want to continue anyway? [y/N]:${NC} )" -n 1 -r
echo ""
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
log_info "Installation cancelled by user"
log_info "You can manually remove the build/ directory with: rm -rf build"
exit 0
fi
log_warn "Continuing with existing build/ directory. Things might go wrong!"
fi

# Step 5: Install forge package
log_info "Step 5: Installing forge package..."
pip install --no-deps --force-reinstall .
if [ $? -ne 0 ]; then
log_error "Failed to install forge package"
Expand Down Expand Up @@ -248,7 +266,7 @@ log_info "Unsetting CUDA_HOME and overwriting the LD_LIBRARY_PATH"
unset CUDA_HOME
export LD_LIBRARY_PATH=${CONDA_PREFIX}/lib

# Step 5: Ask user to test
# Step 6: Ask user to test
echo ""
log_info "Installation completed successfully!"
echo ""
Expand Down
Loading