{"id":20655400,"url":"https://github.com/bhimrazy/litdata-with-minio","last_synced_at":"2026-03-17T16:32:28.244Z","repository":{"id":244512470,"uuid":"815427586","full_name":"bhimrazy/litdata-with-minio","owner":"bhimrazy","description":"Use LitData with MinIO","archived":false,"fork":false,"pushed_at":"2025-10-08T08:11:42.000Z","size":93,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T10:10:16.952Z","etag":null,"topics":["data","docker","docker-compose","litdata","minio","streaming"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bhimrazy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-15T06:11:05.000Z","updated_at":"2025-10-08T08:11:45.000Z","dependencies_parsed_at":"2024-06-15T09:23:59.867Z","dependency_job_id":"4255e845-426d-40a7-a914-9379a5fff2ba","html_url":"https://github.com/bhimrazy/litdata-with-minio","commit_stats":null,"previous_names":["bhimrazy/litdata-with-minio"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bhimrazy/litdata-with-minio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhimrazy%2Flitdata-with-minio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhimrazy%2Flitdata-with-minio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhimrazy%2Flitdata-with-minio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhimrazy%2Flitdata-with-minio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bhimrazy","download_url":"https://codeload.github.com/bhimrazy/litdata-with-minio/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhimrazy%2Flitdata-with-minio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30627165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T14:16:03.965Z","status":"ssl_error","status_checked_at":"2026-03-17T14:16:03.380Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data","docker","docker-compose","litdata","minio","streaming"],"created_at":"2024-11-16T18:10:50.869Z","updated_at":"2026-03-17T16:32:28.239Z","avatar_url":"https://github.com/bhimrazy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eUse LitData with MinIO\u003c/h1\u003e\n  \u003cimg src=\"https://github.com/bhimrazy/litdata-with-minio/actions/workflows/ci.yml/badge.svg\" alt=\"CI Status\"/\u003e\n  \u003ca href=\"https://github.com/bhimrazy/litdata-with-minio/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/bhimrazy/litdata-with-minio\" alt=\"License\"/\u003e\n  \u003c/a\u003e\n  \u003cbr/\u003e\n  \u003cimg src=\"https://github.com/bhimrazy/litdata-with-minio/assets/46085301/49e34dc3-8176-4395-b628-99c315f5e7c2\" alt=\"LitData with MinIO\" width=\"640\" height=\"360\"/\u003e\n  \u003cbr/\u003e\n\u003c/div\u003e\n\nLitData empowers efficient data optimization and distributed training across cloud storage environments. Pairing it with MinIO—a high-performance, S3-compatible object store—exemplifies a streamlined and scalable data handling workflow for modern AI applications.\n\nThis guide provides two ways to get started: a fast, automated setup using `make` (recommended) and a detailed manual setup.\n\n## Prerequisites\n\n- **Docker and Docker Compose**: Ensure Docker is running on your system.\n- **Python**: Python 3.10+ is recommended.\n- **cURL**: Used for downloading the `uv` installer.\n\n## Getting Started\n\n### Step 1: Clone the Repository\n\n```bash\ngit clone https://github.com/bhimrazy/litdata-with-minio.git\ncd litdata-with-minio\n```\n\n### Step 2: Configure Environment Variables\n\nCreate a `.env` file from the provided template. This file will hold your configuration, keeping secrets out of your code.\n\n```bash\ncp .env.example .env\n```\n\nYou can customize the settings in `.env` if needed, but the defaults are configured to work with the local MinIO instance.\n\n### Step 3: Setup and Installation\n\nChoose one of the following methods to set up the environment and install dependencies.\n\n---\n\n### Option A: Automated Setup with `make` (Recommended)\n\nThis is the fastest way to get up and running.\n\n1.  **Install Dependencies \u0026 Create Virtual Environment**:\n    This single command installs `uv`, creates a virtual environment, and installs all required Python packages.\n\n    ```bash\n    make install\n    ```\n\n2.  **Start MinIO Server**:\n\n    ```bash\n    make up\n    ```\n\n    You can access the MinIO console at **http://127.0.0.1:9001**.\n\n3.  **Configure AWS Credentials**:\n    This command configures the `aws` CLI to connect to your local MinIO server, using the credentials from your `.env` file.\n    ```bash\n    make setup-credentials\n    ```\n\n---\n\n### Option B: Manual Setup\n\nFollow these steps if you prefer a manual approach or do not have `make`.\n\n1.  **Install [`uv`](https://docs.astral.sh/uv/) Package Manager**:\n    `uv` is a fast, modern Python package manager.\n\n    ```bash\n    curl -LsSf https://astral.sh/uv/install.sh | sh\n    ```\n\n    After installation, follow the instructions on your screen to add `uv` to your `PATH`.\n\n2.  **Create Virtual Environment and Install Dependencies**:\n\n    ```bash\n    # Create the virtual environment\n    uv venv --python=3.12\n\n    # Activate the virtual environment\n    source .venv/bin/activate\n\n    # Install packages\n    uv sync\n    ```\n\n3.  **Start MinIO Server**:\n\n    ```bash\n    docker-compose up -d\n    ```\n\n    You can access the MinIO console at **http://127.0.0.1:9001**.\n\n4.  **Configure AWS Credentials**:\n    You can configure credentials in two ways.\n\n    **Option 1: Manually create AWS config files.**\n\n    Create or update your `~/.aws/credentials` and `~/.aws/config` files to match the following, using the values from your `.env` file.\n\n    **`~/.aws/credentials`**:\n\n    ```ini\n    [default]\n    aws_access_key_id = minioadmin\n    aws_secret_access_key = minioadmin\n    ```\n\n    **`~/.aws/config`**:\n\n    ```ini\n    [default]\n    region = us-east-1\n    output = json\n    endpoint_url = http://127.0.0.1:9000\n    ```\n\n    **Option 2: Use the AWS CLI.**\n\n    Ensure your virtual environment is activated (`source .venv/bin/activate`) and run the following commands:\n\n    ```bash\n    # Set credentials and configuration\n    aws configure set aws_access_key_id minioadmin\n    aws configure set aws_secret_access_key minioadmin\n    aws configure set region us-east-1\n    aws configure set output json\n    aws configure set endpoint_url http://127.0.0.1:9000\n    ```\n\n    Alternatively, you can run `aws configure` for an interactive prompt.\n\n---\n\n## Usage\n\nOnce the setup is complete, you can prepare your data, upload it to MinIO, and run the streaming dataset example.\n\n### Using `make`\n\n1.  **Prepare Data**:\n    ```bash\n    make prepare-data\n    ```\n2.  **Upload to MinIO**:\n    ```bash\n    make upload-data\n    ```\n3.  **Stream Data**:\n    ```bash\n    make stream-data\n    ```\n\n### Manual Usage\n\nEnsure your virtual environment is activated (`source .venv/bin/activate`).\n\n1.  **Prepare Data**:\n    ```bash\n    python prepare_data.py\n    ```\n2.  **Upload to MinIO**:\n\n    ```bash\n    # Create the bucket (if it doesn't exist)\n    aws s3 mb s3://my-bucket\n\n    # Copy the data\n    aws s3 cp --recursive my_optimized_dataset s3://my-bucket/my_optimized_dataset\n    ```\n\n3.  **Stream Data**:\n    ```bash\n    python streaming_dataset.py\n    ```\n\n## Makefile Commands\n\nThe `Makefile` provides several convenient commands:\n\n- `make install`: Sets up `uv` and installs all dependencies.\n- `make up`: Starts the MinIO Docker container.\n- `make down`: Stops the MinIO container.\n- `make setup-credentials`: Configures AWS CLI for MinIO.\n- `make prepare-data`: Runs the data preparation script.\n- `make upload-data`: Uploads the optimized dataset to MinIO.\n- `make stream-data`: Runs the streaming dataset example.\n- `make clean`: Removes generated data and the virtual environment.\n\n## References\n\n- [Litdata](https://github.com/Lightning-AI/litdata)\n- [MinIO Docker Compose Configuration](https://github.com/minio/minio/blob/master/docs/orchestration/docker-compose/docker-compose.yaml)\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## Authors\n\n- [Bhimraj Yadav](https://github.com/bhimrazy)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhimrazy%2Flitdata-with-minio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhimrazy%2Flitdata-with-minio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhimrazy%2Flitdata-with-minio/lists"}