# Get `len` and `sha256` using # $ curl -sSL "https://github.com/facebookresearch/pytorch3d/archive/055ab3a2e3e611dff66fa82f632e62a315f3b5e7.tar.gz" | tee >(wc -c) >(shasum -a 256) >/dev/null COMMIT_REF = "055ab3a2e3e611dff66fa82f632e62a315f3b5e7" TORCH_VERSION = "2.5.1" CUDA_VERSION = "12.1" file( name = "pytorch3d-archive", source = http_source( filename = "pytorch3d.tar.gz", len = 36381676, sha256 = "25665bdf28516a322fb784d914423ad7930429053c460b3bd77125b18935c8fe", url = "https://github.com/facebookresearch/pytorch3d/archive/{}.tar.gz".format(COMMIT_REF), ), ) shell_command( name = "pytorch3d-extracted", command = "tar -xf pytorch3d.tar.gz; ls -latrh; pwd;", execution_dependencies = [":pytorch3d-archive"], output_directories = ["pytorch3d-{}".format(COMMIT_REF)], tools = [ "gzip", "tar", ], ) relocated_files( name = "pytorch3d-source", src = "{}/pytorch3d-{}".format( build_file_dir(), COMMIT_REF, ), dest = "{}".format(build_file_dir()), files_targets = [":pytorch3d-extracted"], ) resource( name = "pyproject", source = "pyproject.toml", ) python_distribution( name = "pytorch3d", dependencies = [ ":pytorch3d-source", ":pyproject", ], env_vars = [ "TORCH_VERSION={}".format(TORCH_VERSION), "CUDA_VERSION={}".format(CUDA_VERSION), "COMMIT_REF={}".format(COMMIT_REF), "FORCE_CUDA=1", ], generate_setup = False, provides = python_artifact(), sdist = False, )