Skip to content

Instantly share code, notes, and snippets.

@beinan
Created September 27, 2024 00:39
Show Gist options
  • Save beinan/f6991ff5146803514aa726dcc891d085 to your computer and use it in GitHub Desktop.
Save beinan/f6991ff5146803514aa726dcc891d085 to your computer and use it in GitHub Desktop.
# Import fsspec & alluxio fsspec implementationimport fsspec
from alluxiofs import AlluxioFileSystem
fsspec.register_implementation(“alluxio”, AlluxioFileSystem)
# Create Alluxio filesystem with S3 as the underlying storage system
alluxio = fsspec.filesystem(“alluxio”, target_protocol=“s3”, etcd_host=args.etcd_host)
# Ray reads data from Alluxio using S3 URL
ds = ray.data.read_images(“s3://datasets/imagenet-full/train”, filesystem=alluxio)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment