简体   繁体   中英

how can I download data to jupyter notebook in kubeflow from minio?

Hello I am triying to download a csv from a kubeflow's minio, I am using the following script inside the jupyter notebook

from minio import Minio
client = Minio(
    "minio:9000", #localhost:9000
    access_key="minio",
    secret_key="minio123",
    secure=False
)

obj = client.get_object(
    "bucket",
    "file.csv",
)

df = pd.read_csv(obj)

but I am getting the following error:

MaxRetryError: HTTPConnectionPool(host='minio', port=9000): Max retries exceeded with url: /courses?location= (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fbb17778128>: Failed to establish a new connection: [Errno -2] Name or service not known',))

How can I get access to minio node, in order to download data?

Thanks

Finally you can use

from minio import Minio
client = Minio(
    "minio-service.kubeflow.svc.cluster.local:9000"
    access_key="minio",
    secret_key="minio123",
    secure=False
)

obj = client.get_object(
    "bucket",
    "file.csv",
)

df = pd.read_csv(obj)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM