From e0999536b5a018d7b627b4cdf6a3b762c3f59aa5 Mon Sep 17 00:00:00 2001 From: Lucain Pouget Date: Fri, 16 Sep 2022 14:32:17 +0200 Subject: [PATCH] Remove legacy helper 'install_lfs_in_userspace' --- src/huggingface_hub/lfs.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/huggingface_hub/lfs.py b/src/huggingface_hub/lfs.py index 9d61c9e830..78b370b931 100644 --- a/src/huggingface_hub/lfs.py +++ b/src/huggingface_hub/lfs.py @@ -16,8 +16,6 @@ import io import os import re -import subprocess -import sys from contextlib import AbstractContextManager from dataclasses import dataclass from math import ceil @@ -36,24 +34,6 @@ LFS_MULTIPART_UPLOAD_COMMAND = "lfs-multipart-upload" - -def install_lfs_in_userspace(): - """ - If in Linux, installs git-lfs in userspace (sometimes useful if you can't - `sudo apt install` or equivalent). - """ - if sys.platform != "linux": - raise ValueError("Only implemented for Linux right now") - GIT_LFS_TARBALL = "https://github.com/git-lfs/git-lfs/releases/download/v2.13.1/git-lfs-linux-amd64-v2.13.1.tar.gz" - CWD = os.path.join(os.getcwd(), "install_lfs") - os.makedirs(CWD, exist_ok=True) - subprocess.run( - ["wget", "-O", "tarball.tar.gz", GIT_LFS_TARBALL], check=True, cwd=CWD - ) - subprocess.run(["tar", "-xvzf", "tarball.tar.gz"], check=True, cwd=CWD) - subprocess.run(["bash", "install.sh"], check=True, cwd=CWD) - - LFS_HEADERS = { "Accept": "application/vnd.git-lfs+json", "Content-Type": "application/vnd.git-lfs+json",