From 791ffae70f1b985e38650edf5a16f26c16c5f59e Mon Sep 17 00:00:00 2001 From: HysunHe Date: Sun, 22 Dec 2024 17:29:12 +0800 Subject: [PATCH] Use latest RClone version (v1.68.2) --- sky/data/storage.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/sky/data/storage.py b/sky/data/storage.py index 9941e35c99c..a496bef3ab6 100644 --- a/sky/data/storage.py +++ b/sky/data/storage.py @@ -3615,8 +3615,7 @@ class OciStore(AbstractStore): """ _ACCESS_DENIED_MESSAGE = 'AccessDeniedException' - RCLONE_VERSION_DEB = 'v1.61.1' - RCLONE_VERSION_RPM = 'v1.68.2' + RCLONE_VERSION = 'v1.68.2' def __init__(self, name: str, @@ -3926,13 +3925,13 @@ def mount_command(self, mount_path: str) -> str: # pylint: disable=line-too-long install_cmd = ( f'(which dpkg > /dev/null 2>&1 && (which rclone > /dev/null || (cd ~ > /dev/null' - f' && curl -O https://downloads.rclone.org/{self.RCLONE_VERSION_DEB}/rclone-{self.RCLONE_VERSION_DEB}-linux-amd64.deb' - f' && sudo dpkg -i rclone-{self.RCLONE_VERSION_DEB}-linux-amd64.deb' - f' && rm -f rclone-{self.RCLONE_VERSION_DEB}-linux-amd64.deb)))' + f' && curl -O https://downloads.rclone.org/{self.RCLONE_VERSION}/rclone-{self.RCLONE_VERSION}-linux-amd64.deb' + f' && sudo dpkg -i rclone-{self.RCLONE_VERSION}-linux-amd64.deb' + f' && rm -f rclone-{self.RCLONE_VERSION}-linux-amd64.deb)))' f' || (which rclone > /dev/null || (cd ~ > /dev/null' - f' && curl -O https://downloads.rclone.org/{self.RCLONE_VERSION_RPM}/rclone-{self.RCLONE_VERSION_RPM}-linux-amd64.rpm' - f' && sudo yum --nogpgcheck install rclone-{self.RCLONE_VERSION_RPM}-linux-amd64.rpm -y' - f' && rm -f rclone-{self.RCLONE_VERSION_RPM}-linux-amd64.rpm))') + f' && curl -O https://downloads.rclone.org/{self.RCLONE_VERSION}/rclone-{self.RCLONE_VERSION}-linux-amd64.rpm' + f' && sudo yum --nogpgcheck install rclone-{self.RCLONE_VERSION}-linux-amd64.rpm -y' + f' && rm -f rclone-{self.RCLONE_VERSION}-linux-amd64.rpm))') # pylint: disable=line-too-long mount_cmd = ( @@ -3944,13 +3943,12 @@ def mount_command(self, mount_path: str) -> str: f' oci-config-profile {self.config_profile}' f' && sed -i "s/oci-config-file/config_file/g;' f' s/oci-config-profile/config_profile/g" ~/.config/rclone/rclone.conf' - f' && rclone mount oos_{self.name}:{self.name} {mount_path} --daemon --allow-non-empty' + f' && ([ ! -f /bin/fusermount3 ] && sudo ln -s /bin/fusermount /bin/fusermount3 || true)' + f' && (grep -q {mount_path} /proc/mounts || rclone mount oos_{self.name}:{self.name} {mount_path} --daemon --allow-non-empty)' ) # pylint: disable=line-too-long - version_check_cmd = ( - f'(which dpkg > /dev/null 2>&1 && (rclone --version | grep -q {self.RCLONE_VERSION_DEB}))' - f' || (rclone --version | grep -q {self.RCLONE_VERSION_RPM})') + version_check_cmd = f'rclone --version | grep -q {self.RCLONE_VERSION}' return mounting_utils.get_mounting_command(mount_path, install_cmd, mount_cmd, version_check_cmd)