tensorflow.python.framework.errors_impl.PermissionDeniedError: /home/tensorflow_datasets; Permission denied

测试tensorflowonspark的例子的时候,提交的命令如下:

/opt/cloudera/parcels/CDH-6.2.1-1.cdh6.2.1.p0.1580995/bin/spark-submit \
--master yarn \
--deploy-mode cluster \
--queue ${QUEUE} \
--num-executors 3 \
--executor-memory 16G \
--archives hdfs:///user/root/mnist.zip \
--jars hdfs:///user/root/tensorflow-hadoop-1.0-SNAPSHOT.jar \
/opt/FUZHI/TensorFlowOnSpark-2.2.4/examples/mnist/mnist_data_setup.py \
--output mnist


[1mDownloading and preparing dataset mnist/3.0.1 (download: 11.06 MiB, generated: 21.00 MiB, total: 32.06 MiB) to /home/tensorflow_datasets/mnist/3.0.1... Traceback (most recent call last): File "mnist_data_setup.py", line 27, in <module> mnist, info = tfds.load('mnist', with_info=True) File "/opt/module/python3/lib/python3.7/site-packages/tensorflow_datasets/core/api_utils.py", line 53, in disallow_positional_args_dec return fn(*args, **kwargs) File "/opt/module/python3/lib/python3.7/site-packages/tensorflow_datasets/core/registered.py", line 339, in load dbuilder.download_and_prepare(**download_and_prepare_kwargs) File "/opt/module/python3/lib/python3.7/site-packages/tensorflow_datasets/core/api_utils.py", line 53, in disallow_positional_args_dec return fn(*args, **kwargs) File "/opt/module/python3/lib/python3.7/site-packages/tensorflow_datasets/core/dataset_builder.py", line 349, in download_and_prepare download_config=download_config) File "/opt/module/python3/lib/python3.7/site-packages/tensorflow_datasets/core/dataset_builder.py", line 767, in _make_download_manager register_checksums=download_config.register_checksums, File "/opt/module/python3/lib/python3.7/site-packages/tensorflow_datasets/core/api_utils.py", line 53, in disallow_positional_args_dec return fn(*args, **kwargs) File "/opt/module/python3/lib/python3.7/site-packages/tensorflow_datasets/core/download/download_manager.py", line 193, in __init__ tf.io.gfile.makedirs(self._download_dir) File "/opt/module/python3/lib/python3.7/site-packages/tensorflow_core/python/lib/io/file_io.py", line 453, in recursive_create_dir_v2 pywrap_tensorflow.RecursivelyCreateDir(compat.as_bytes(path)) tensorflow.python.framework.errors_impl.PermissionDeniedError: /home/tensorflow_datasets; Permission denied

解决办法:

把master、slave1和slave2下的/home目录的权限更改为777(rwxrwxrwx)

posted @ 2021-12-15 21:13  15python  阅读(315)  评论(0编辑  收藏  举报