trailbehind / DeepOSM

Train a deep learning net with OpenStreetMap features and satellite imagery.
MIT License
1.31k stars 182 forks source link

Cannot download NAIP images on s3 using boto #77

Closed andrewjavao closed 7 years ago

andrewjavao commented 7 years ago

I‘ve configurated s3cfg, and i can download naip image via s3cmd fine, but when running bin/create_training_data.py, it ends up 403 error when downloading naip images.

andrewljohnson commented 7 years ago

That sounds like when running s3cmd within the Docker/script, your credentials are not being used.

Did you export your AWS credentials per the README?

andrewjavao commented 7 years ago

I put the credentials into .s3cfg file right way inside the container, without setting docker container's environment parameter. Maybe that is the problem, I'll try. I saw naip_images.py overwrites AWS credentials in .s3cfg with env-value in function configure_s3cmd(). Since I can download via s3cmd inside the container, so I modified the downloading code a little bit myself(just for debugging), I comment out boto client and os.system(s3cmd) to do the downloading. Though this works for me, but I'll try to setting up per the README, and make this issue clear.

andrewjavao commented 7 years ago

I followed the README, and export AWS credentials before runing the container and it works just fine. My bad.