Spaces:
Sleeping
Sleeping
from peft import PeftModel, PeftConfig | |
import torch | |
from datasets import load_dataset | |
torch.cuda.is_available() | |
print("executed successfully") | |
dataset_name = "timdettmers/openassistant-guanaco" | |
dataset = load_dataset(dataset_name, split="train") | |
import os | |
ld_library_path = os.environ.get("LD_LIBRARY_PATH") | |
print(ld_library_path) | |
# The directory to search in | |
search_directory = '/usr/' | |
# The filename pattern to look for (wildcard * is used) | |
filename_pattern = 'libcuda.so.*' | |
# Initialize a list to store the paths of matching files | |
matching_files = [] | |
# Walk through the directory and its subdirectories | |
for root, dirs, files in os.walk(search_directory): | |
for file in files: | |
if file.startswith('libcuda.so.'): | |
matching_files.append(os.path.join(root, file)) | |
# Print the paths of matching files | |
for file in matching_files: | |
print(file) | |