dataset.sh Server
You can run a dataset.sh
server if you:
- Want to manage datasets within your organization.
- Want to utilize the web UI to manage your locally managed datasets.
Start the server
deploy with flask dev server
python -m dataset_sh.server.app
deploy using gunicorn
gunicorn -b 0.0.0.0:8989 "dataset_sh.server.app:create_app()"
Server configuration
dataset.sh
server use json config file like this:
{
"require_auth": false,
"allow_upload": false,
"hostname": "",
"users": [],
"secret": "----some---random---secret---",
"data_folder": "/Users/_____/dataset_sh/storage",
"uploader_folder": "/Users/_____/dataset_sh/uploader",
"article_folder": "/Users/_____/dataset_sh/posts",
"max_chunk_count": 500,
"minimal_chunk_size": 1048576
}
By default, the app will use config file at './dataset-sh-server-config.json'
, you can change its location by
--config
, e.g.python -m dataset_sh.server.app --config /path/to/config.json
- set environment variable:
DATASET_SH_SERVER_CONFIG_FILE
Managing User and Permissions
dataset.sh
use the following two config value to control
everyone can view and download, but no one is allowed to upload via remote api
{
"require_auth": false,
"allow_upload": false
}
only authorized users can view, download, and upload via remote api
{
"require_auth": true,
"allow_upload": true
}
only authorized users can view and download, but no one is allowed to upload via remote api
{
"require_auth": true,
"allow_upload": false
}
everyone can view, download and upload
{
"require_auth": false,
"allow_upload": true
}