이 페이지에서는 Dataflow와 함께 Cloud Storage FUSE를 사용하여 머신러닝 (ML) 작업의 데이터 세트를 처리하는 방법을 설명합니다.
ML 작업을 할 때 Dataflow를 사용하여 대규모 데이터 세트를 처리할 수 있습니다. 하지만 OpenCV와 같은 ML에 사용되는 일부 일반적인 소프트웨어 라이브러리에는 입력 파일 요구사항이 있습니다. 이러한 애플리케이션은 클라우드 기반 저장소가 아닌 로컬 컴퓨터의 하드 드라이브에 저장된 것처럼 파일에 액세스해야 하는 경우가 많습니다. 이 요구사항으로 인해 어려움과 지연이 발생합니다. 해결 방법으로 파이프라인은 입력에 특수 I/O 커넥터를 사용하거나 처리 전에 Dataflow 가상 머신 (VM)에 파일을 다운로드할 수 있습니다. 이러한 솔루션은 비효율적인 경우가 많습니다.
Cloud Storage FUSE는 이러한 비효율적인 솔루션을 방지하는 방법을 제공합니다.
Cloud Storage FUSE를 사용하면 Cloud Storage 버킷을 Dataflow VM에 마운트할 수 있습니다. 이렇게 하면 Cloud Storage의 파일이 로컬 파일인 것처럼 표시됩니다. 따라서 ML 소프트웨어는 미리 다운로드하지 않고도 직접 액세스할 수 있습니다.
이점
ML 작업에 Cloud Storage FUSE를 사용하면 다음과 같은 이점이 있습니다.
Cloud Storage에서 호스팅되는 입력 파일은 로컬 파일 시스템 시맨틱스를 사용하여 Dataflow VM에서 액세스할 수 있습니다.
데이터는 필요할 때 액세스하므로 입력 파일을 미리 다운로드할 필요가 없습니다.
지원 및 제한 사항
Dataflow에서 Cloud Storage FUSE를 사용하려면 인터넷 액세스 요구사항을 충족하도록 외부 IP 주소를 사용하여 작업자 VM을 구성해야 합니다.
Cloud Storage FUSE와 함께 사용할 버킷 지정
VM에 마운트할 Cloud Storage 버킷을 지정하려면 --experiments 플래그를 사용합니다. 버킷을 여러 개 지정하려면 버킷 이름 사이에 세미콜론 구분자 (;)를 사용하세요.
형식은 다음과 같습니다.
--experiments="gcsfuse_buckets=CONFIG"
다음을 바꿉니다.
CONFIG: Cloud Storage 항목의 세미콜론으로 구분된 목록입니다. 각 항목은 다음 중 하나입니다.
BUCKET_NAME: Cloud Storage 버킷 이름입니다.
예를 들면 dataflow-samples입니다. 버킷 모드를 생략하면 버킷이 읽기 전용으로 처리됩니다.
BUCKET_NAME:MODE: Cloud Storage 버킷 이름과 연결된 모드입니다. 여기서 MODE은 ro (읽기 전용) 또는 rw (읽기-쓰기)입니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Process ML data using Dataflow and Cloud Storage FUSE\n\nThis page describes how to use\n[Cloud Storage FUSE](/storage/docs/cloud-storage-fuse/overview) with Dataflow\nto process datasets for machine learning (ML) tasks.\n\nWhen working with ML tasks, Dataflow can be used for processing large\ndatasets. However, some common software libraries used for ML, like OpenCV, have\ninput file requirements. They frequently require files to be accessed as if they\nare stored on a local computer's hard drive, rather than from cloud-based\nstorage. This requirement creates difficulties and delays. As a solution,\npipelines can either use special I/O connectors for input or download files onto\nthe Dataflow virtual machines (VMs) before processing. These solutions\nare frequently inefficient.\n\nCloud Storage FUSE provides a way to avoid these inefficient solutions.\nCloud Storage FUSE lets you mount your Cloud Storage buckets onto the\nDataflow VMs. This makes the files in Cloud Storage appear as if they\nare local files. As a result, the ML software can access them directly without\nneeding to download them beforehand.\n\nBenefits\n--------\n\nUsing Cloud Storage FUSE for ML tasks offers the following benefits:\n\n- Input files hosted on Cloud Storage can be accessed in the Dataflow VM using local file system semantics.\n- Because the data is accessed on-demand, the input files don't have to be downloaded beforehand.\n\nSupport and limitations\n-----------------------\n\n- To use Cloud Storage FUSE with Dataflow, you must configure worker VMs with [external IP addresses](/dataflow/docs/guides/routes-firewall#internet_access_for) so that they meet the internet access requirements.\n\nSpecify buckets to use with Cloud Storage FUSE\n----------------------------------------------\n\nTo specify a Cloud Storage bucket to mount to a VM, use the\n[`--experiments`](/dataflow/docs/reference/pipeline-options) flag. To specify\nmultiple buckets, use a semicolon delimiter (`;`) between bucket names.\n\nThe format is as follows: \n\n --experiments=\"gcsfuse_buckets=\u003cvar translate=\"no\"\u003eCONFIG\u003c/var\u003e\"\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eCONFIG\u003c/var\u003e: a semicolon-delimited list of\n Cloud Storage entries, where each entry is one of the following:\n\n 1. \u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e: A Cloud Storage bucket name.\n For example, `dataflow-samples`. If you omit the bucket mode, the bucket\n is treated as read-only.\n\n 2. \u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e`:`\u003cvar translate=\"no\"\u003eMODE\u003c/var\u003e: A\n Cloud Storage bucket name and its associated mode, where `MODE` is\n either `ro` (read-only) or `rw` (read-write).\n\n For example: \n\n --experiments=\"gcsfuse_buckets=read-bucket1;read-bucket2:ro;write-bucket1:rw\"\n\n In this example, specifying the mode assures the following:\n - `gs://read-bucket1` is mounted in read-only mode.\n - `gs://read-bucket2` is mounted in read-only mode.\n - `gs://write-bucket1` is mounted in read-write mode.\n\n Beam pipeline code can access these buckets at\n `/var/opt/google/gcs/`\u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e."]]