cleanroom data コマンド ############## Cleanroom内のデータのアップロード、ダウンロード、管理を行います。 .. _command-cleanroom-data-cp: cleanroom data cp ***************** ローカル環境とcleanroom間でデータをコピーします。 | データをuploadする場合は<ソースパス>にローカル環境のパスを指定し、<宛先パス>にcleanroomのパスを指定します。 | データをdownloadする場合は<ソースパス>にcleanroomのパスを指定し、<宛先パス>にローカル環境のパスを指定します。 | cleanroomのパスは :<パス> の形式で指定します。 使用方法 ======== .. code-block:: console apc cleanroom data cp <ソースパス> <宛先パス> \ --profile <プロファイル名> .. admonition:: 例 .. code-block:: console # ローカル環境のinput_1ディレクトリをappという名前のcleanroomのinput_1ディレクトリにアップロードする apc cleanroom data cp ./input_1 app:input_1/ --profile acompany # appという名前のcleanroomのoutput_1ディレクトリをローカル環境のoutput_1ディレクトリにダウンロードする apc cleanroom data cp app:output_1/ ./output_1/ --profile acompany 引数 ------ .. option:: <ソースパス> コピー元のパスを指定します。 .. option:: <宛先パス> コピー先のパスを指定します。 オプション ---------- .. option:: --profile <プロファイル名> 認証情報のプロファイル名を指定します。 .. dropdown:: 正常終了時の出力例 .. code-block:: console # ローカルからcleanroomにアップロードする場合 $ apc cleanroom data cp ./input_1 app:input_1/ --profile acompany worker_id: worker_abc123 work_id: work_xyz789 nonce: nonce_12345 Uploading ./input_1 to app:input_1/ ... Handshake: OK. Input file uploaded successfully. # cleanroomからローカルにダウンロードする場合 $ apc cleanroom data cp app:output_1/ ./output_1/ --profile acompany Downloading from app:output_1/ to ./output_1/ Using cached shared secret. Output file downloaded successfully. .. dropdown:: 異常終了時の出力例 .. code-block:: console # 存在しないcleanroom名を指定した場合 $ apc cleanroom data cp ./input_1 nonexistent_app:input_1/ --profile acompany NotFoundError: CleanRoom 'nonexistent_app' not found. # パスの指定形式が間違っている場合 $ apc cleanroom data cp ./input_1 ./output_1 --profile acompany ValidationError: and must contain ':' # ハンドシェイクが失敗した場合 $ apc cleanroom data cp ./input_1 app:input_1/ --profile acompany worker_id: worker_abc123 work_id: work_xyz789 nonce: nonce_12345 Uploading ./input_1 to app:input_1/ ... Handshake: Failed. Attestation verification failed # 設定不備の場合 $ apc cleanroom data cp ./input_1 app:input_1/ --profile acompany ConfigError: mr_enclave is not set in config.toml # ディレクトリサイズが1GBを超える場合 $ apc cleanroom data cp ./large_input app:input_1/ --profile acompany ValidationError: Directory size exceeds 1GB limit. Current size: 1.10GB # 指定先がディレクトリでない場合 $ apc cleanroom data cp ./non-directory app:input_1/ --profile acompany ValidationError: Source path is not a directory: non-directory # 存在しないディレクトリを指定した場合 $ apc cleanroom data cp ./non-existent-dir app:input_1/ --profile acompany ValidationError: Source path does not exist: non-existent-dir # ディレクトリが空の場合 $ apc cleanroom data cp ./empty-dir app:input_1/ --profile acompany ValidationError: Source directory is empty: empty-dir # ユーザーにアップロード権限がない場合 $ apc cleanroom data cp ./input_1 app:input_1/ --profile acompany ValidationError: User ID 'WzmQ8zrP6yovpQkK6QQa3ZjlPB-fVELmAhTkUC4ufWc=' does not have permission to upload to input ID 'input_1'. Allowed user ID: 'aCQjsGP60gRlYoVy76345JoaURWmhgkZAIoqK_WzR5s='. Please check the cleanroom 'app' configuration.