diff --git a/scripts/setup-ubuntu.sh b/scripts/setup-ubuntu.sh
index 1b5007cbfdb80..8d3c2165091b3 100755
--- a/scripts/setup-ubuntu.sh
+++ b/scripts/setup-ubuntu.sh
@@ -106,17 +106,19 @@ function install_fbthrift {
 }
 
 function install_conda {
-  mkdir -p conda && cd conda
+  MINICONDA_PATH=/opt/miniconda-for-velox
+  if [ -e ${MINICONDA_PATH}i ]; then
+    echo "File or directory already exists: ${MINICONDA_PATH}"
+    return
+  fi
   ARCH=$(uname -m)
-  
   if [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "aarch64" ]; then
     echo "Unsupported architecture: $ARCH"
     exit 1
   fi
   
+  mkdir -p conda && cd conda
   wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-$ARCH.sh
-  
-  MINICONDA_PATH=/opt/miniconda-for-velox
   bash Miniconda3-latest-Linux-$ARCH.sh -b -p $MINICONDA_PATH
 }