You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.5 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. storage initializer download script
  2. ### usage
  3. 1. s3 with public access:
  4. ```shell
  5. python3 download.py s3://models/classification/model.tar.gz /tmp/models/
  6. # we then download model.tar.gz and extract it into /tmp/models/
  7. ```
  8. 2. s3 with ak/sk:
  9. ```shell
  10. export S3_ENDPOINT_URL=https://play.min.io
  11. export ACCESS_KEY_ID=Q3AM3UQ867SPQQA43P2F
  12. export SECRET_ACCESS_KEY=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
  13. python3 download.py s3://datasets/mnist/1.jpg /tmp
  14. # we then download the file 1.jpg into /tmp, and result is /tmp/1.jpg.
  15. python3 download.py s3://datasets/mnist /tmp
  16. # we then download the folder mnist into /tmp, and result is /tmp/mnist.
  17. ```
  18. 3. http server:
  19. ```shell
  20. python3 download.py http://192.168.3.20/model.pb /tmp/models/
  21. # we then download model.pb into /tmp/models/
  22. ```
  23. 4. multi downloads:
  24. ```shell
  25. python3 download.py http://192.168.3.20/model.pb /tmp/models/ s3://datasets/mnist /tmp/mnist/
  26. # we then download model.pb into /tmp/models/
  27. # and mnist into /tmp/mnist
  28. ```
  29. 5. indirect download(only support s3-compatible):
  30. the content of `s3://datasets/mnist-index.txt`:
  31. ```text
  32. # this first uncomment line is the directory
  33. s3://datasets
  34. mnist/0.jpeg
  35. mnist/1.jpeg
  36. mnist/2.jpeg
  37. ```
  38. ```shell
  39. export S3_ENDPOINT_URL=https://play.min.io
  40. export ACCESS_KEY_ID=Q3AM3UQ867SPQQA43P2F
  41. export SECRET_ACCESS_KEY=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
  42. # note the char @ indicates it's indirect
  43. python3 download.py s3://datasets/mnist-index.txt @/tmp/mnist
  44. # then only download the mnist/{0,1,2}.jpeg into /tmp/mnist/
  45. ```