Skip to content

Commit b27c646

Browse files
authored
Merge pull request #684 from transformerlab/fix/remove-mounting
Remove the installation of any mounting lib from install.sh
2 parents b24d4bb + b6e03bd commit b27c646

File tree

1 file changed

+2
-127
lines changed

1 file changed

+2
-127
lines changed

install.sh

Lines changed: 2 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -479,123 +479,6 @@ doctor() {
479479

480480
}
481481

482-
##############################
483-
## Optional: Install Mountpoint for Amazon S3 (Linux only)
484-
##############################
485-
486-
install_s3_mounting() {
487-
title "Install S3 Mounting Tools"
488-
489-
# Only proceed if TFL_MULTITENANT is exactly "true"
490-
if [[ "${TFL_MULTITENANT:-}" != "true" ]]; then
491-
echo "Skipping S3 mounting install because TFL_MULTITENANT is not 'true'."
492-
return 0
493-
fi
494-
495-
if [[ -n "${TLAB_ON_MACOS}" ]]; then
496-
install_s3fs_macos
497-
else
498-
install_mountpoint_linux
499-
fi
500-
}
501-
502-
install_s3fs_macos() {
503-
title "Install s3fs for macOS S3 Mounting"
504-
505-
if command -v s3fs >/dev/null 2>&1; then
506-
ohai "✅ s3fs already installed (s3fs found)."
507-
return 0
508-
fi
509-
510-
# Check if Homebrew is installed
511-
if ! command -v brew >/dev/null 2>&1; then
512-
echo "Installing Homebrew first..."
513-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
514-
515-
# Add Homebrew to PATH for Apple Silicon Macs
516-
if [[ $(uname -m) == "arm64" ]]; then
517-
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
518-
eval "$(/opt/homebrew/bin/brew shellenv)"
519-
fi
520-
fi
521-
522-
echo "Installing macFUSE (required for s3fs)..."
523-
brew install --cask macfuse
524-
525-
echo "Installing s3fs using Homebrew..."
526-
brew install gromgit/fuse/s3fs-mac
527-
528-
if command -v s3fs >/dev/null 2>&1; then
529-
ohai "✅ s3fs installed successfully."
530-
else
531-
warn "s3fs installation may have failed; 's3fs' not found."
532-
return 1
533-
fi
534-
}
535-
536-
install_mountpoint_linux() {
537-
title "Install Mountpoint for Amazon S3 (Linux only)"
538-
539-
if command -v mount-s3 >/dev/null 2>&1; then
540-
ohai "✅ Mountpoint for Amazon S3 already installed (mount-s3 found)."
541-
return 0
542-
fi
543-
544-
ARCH=$(uname -m)
545-
if [[ "$ARCH" == "aarch64" || "$ARCH" == "arm64" ]]; then
546-
MP_ARCH="arm64"
547-
else
548-
MP_ARCH="x86_64"
549-
fi
550-
551-
TMP_DIR=$(mktemp -d)
552-
cleanup() { rm -rf "$TMP_DIR" 2>/dev/null || true; }
553-
trap cleanup EXIT
554-
555-
if command -v apt-get >/dev/null 2>&1; then
556-
echo "Detected apt-based system. Installing .deb package."
557-
DEB_URL="https://s3.amazonaws.com/mountpoint-s3-release/latest/${MP_ARCH}/mount-s3.deb"
558-
echo "Downloading: $DEB_URL"
559-
wget -q "$DEB_URL" -O "$TMP_DIR/mount-s3.deb"
560-
sudo apt-get install -y "$TMP_DIR/mount-s3.deb"
561-
elif command -v yum >/dev/null 2>&1; then
562-
echo "Detected yum-based system. Installing .rpm package."
563-
RPM_URL="https://s3.amazonaws.com/mountpoint-s3-release/latest/${MP_ARCH}/mount-s3.rpm"
564-
echo "Downloading: $RPM_URL"
565-
wget -q "$RPM_URL" -O "$TMP_DIR/mount-s3.rpm"
566-
sudo yum install -y "$TMP_DIR/mount-s3.rpm"
567-
elif command -v dnf >/dev/null 2>&1; then
568-
echo "Detected dnf-based system. Installing .rpm package."
569-
RPM_URL="https://s3.amazonaws.com/mountpoint-s3-release/latest/${MP_ARCH}/mount-s3.rpm"
570-
echo "Downloading: $RPM_URL"
571-
wget -q "$RPM_URL" -O "$TMP_DIR/mount-s3.rpm"
572-
sudo dnf install -y "$TMP_DIR/mount-s3.rpm"
573-
else
574-
warn "Unsupported Linux package manager for automatic Mountpoint install. Please install manually."
575-
return 1
576-
fi
577-
578-
if command -v mount-s3 >/dev/null 2>&1; then
579-
ohai "✅ Mountpoint for Amazon S3 installed successfully."
580-
else
581-
warn "Mountpoint for Amazon S3 installation may have failed; 'mount-s3' not found."
582-
fi
583-
}
584-
585-
install_mounting() {
586-
title "Step 5: Install Mounting (S3)"
587-
echo "🌘 Step 5: START"
588-
589-
# This wrapper ensures we only run mounting installers when multitenant is truthy
590-
if [[ "${TFL_MULTITENANT:-}" == "true" ]]; then
591-
install_s3_mounting || true
592-
else
593-
echo "Skipping mounting installation because TFL_MULTITENANT is not 'true'."
594-
fi
595-
596-
echo "🌕 Step 5: COMPLETE"
597-
}
598-
599482
print_success_message() {
600483
title "Installation Complete"
601484
echo "------------------------------------------"
@@ -614,11 +497,8 @@ print_success_message() {
614497
}
615498

616499
# Load .env configuration (prefer current dir, then fallback to app src dir)
617-
TFL_MULTITENANT=${TFL_MULTITENANT:-}
618500
load_env_from_file "${RUN_DIR}/.env"
619-
if [ -z "${TFL_MULTITENANT:-}" ]; then
620-
load_env_from_file "${TLAB_CODE_DIR}/.env"
621-
fi
501+
load_env_from_file "${TLAB_CODE_DIR}/.env"
622502

623503
# Check if there are positional arguments; if not, perform full install
624504
if [[ "$#" -eq 0 ]]; then
@@ -627,7 +507,6 @@ if [[ "$#" -eq 0 ]]; then
627507
install_conda
628508
create_conda_environment
629509
install_dependencies
630-
install_mounting
631510
print_success_message
632511
else
633512
for arg in "$@"; do
@@ -644,9 +523,6 @@ else
644523
install_dependencies)
645524
install_dependencies
646525
;;
647-
install_mounting)
648-
install_mounting
649-
;;
650526
doctor)
651527
doctor
652528
;;
@@ -658,8 +534,7 @@ else
658534
;;
659535
*)
660536
# Print allowed arguments
661-
echo "Allowed arguments: [download_transformer_lab, install_conda, create_conda_environment, install_dependencies, install_mounting] or leave blank to perform a full installation."
662-
echo "To enable multitenant setup, set TFL_MULTITENANT=true in a local .env file."
537+
echo "Allowed arguments: [download_transformer_lab, install_conda, create_conda_environment, install_dependencies] or leave blank to perform a full installation."
663538
abort "❌ Unknown argument: $arg"
664539
;;
665540
esac

0 commit comments

Comments
 (0)