Configuration
Config SmooSense to display media files and access S3
1. Displaying images/videos#
1.1 Relative or absolute path on your local computer#
Assuming you have table file and folder structure as below
/Users/xxx/Downloads/
├── table.parquet
└── images
├── one.jpg
├── two.jpg
└── three.jpgThen you can use relative path (based on the table file), or absolute path to display images/videos. Here is one example:
Note that the relative path must start with ./ and absolute path must start with /.
1.2 Public url#
For public data, you can expose them as urls and put the url in table cells. For example:
http://images.cocodataset.org/train2017/000000211189.jpg1.3 On AWS S3 or S3-compatible storage#
Full S3 url is also supported. For example:
s3://bucket/path/to/file.jpgNote that you need to setup AWS S3 authentication. See below.
1.4 Customized private urls#
If you data is private, you can run an API to proxy the url. On the server side, use cookie to authenticate requests.
Make sure the url ends with an image extension (e.g. .jpg) for it to be treated as image url. The same for video.
2. S3 authentication#
2.1 AWS S3#
It is recommended to setup your AWS credentials using AWS CLI v2.
If you use default profile or set credentials using AWS_* environment variables, you can simply run sense to start SmooSense.
sense # I will pick up global AWS configTo use a profile, run
AWS_PROFILE=xxx sense2.2 S3-compatible storage#
Other blob storages that support boto3 sdk are also supported.
You need to provide the endpoint url for that storage.
Below is an example for CloudFlare R2 storage:
AWS_ENDPOINT_URL=https://<account-id>.r2.cloudflarestorage.com AWS_PROFILE=r2 sense3. Run with a specific port number and url prefix#
sense --port 8888 --url-prefix /subpath