ajnisbet / opentopodata

Open alternative to the Google Elevation API!
https://www.opentopodata.org
MIT License
326 stars 70 forks source link

Issue accessing dataset mounted from s3 bucket #88

Closed virajprakash closed 8 months ago

virajprakash commented 11 months ago

Hi, I am getting the following error when I use 'make run' ERROR:root:Invalid config: No dataset folder found at location 'data/dataset' However, I already made sure that the S3 bucket is setup correctly using s3fs and verified on my local file system s3fs idemo /root/opentopodata/data -o passwd_file=${HOME}/.passwd-s3fs

Screen Shot 2023-12-01 at 6 34 13 PM

Also attached are relevant portions of my config.yaml and makefile.

Makefile portion

run: docker run --rm -it --volume /root/opentopodata/data:/app/data:ro -p 5000:5000 opentopodata:$(VERSION)

config.yaml:

Thanks in advance !!!

Yes I know it is not recommended to use root and I will be sure to change that but I am almost positive this is a separate issue.

ajnisbet commented 11 months ago

Hmmm, thanks for the thorough explanation! I haven't encountered this before but I can suggest some things to try:

One would be mounting one directory deeper, so you're passing a "normal" directory to docker rather than a mount point. So mounting s3fs idemo /root/opentopodata/data/s3mount/ then the config file would point to data/s3mount/dataset.

The next step would be execing into the running docker container and having a look around.

ajnisbet commented 11 months ago

I've never used s3fs, but have used rclone mount to mount cloud buckets then have those as docker volumes for opentopodata and gpxz: you could look into that if you're having lots of issues.

virajprakash commented 11 months ago

Hey I am still stuck unfortunately! We have switched to rclone since you seem to be reporting success with using it to mount a cloud bucket specifically on opentopodata. Here are my exact steps:

Screen Shot 2023-12-02 at 5 26 17 PM

start rclone to mount from our s3 bucket into /data/s3mount Leaving this process running, I start a new terminal and use the docker run command from above

Screen Shot 2023-12-02 at 5 33 13 PM Screen Shot 2023-12-02 at 5 34 38 PM

Below are the permissions for all the folders and also all the rest of the commands you mentioned: ls -lh

Screen Shot 2023-12-02 at 5 35 26 PM

ls -lh /app/data/

Screen Shot 2023-12-02 at 5 36 15 PM

and lastly ls -lgh /app/data/dataset returns all of the tiff files

Screen Shot 2023-12-02 at 5 38 02 PM

config.yaml:

name: ned10m path: data/s3mount/dataset

Thank you so much for your help

virajprakash commented 11 months ago

I have also experimented with multiple config paths including the one you suggested and I also did make build before testing any of them using make run. However I am still seeing 'no dataset folder' when i try to run

virajprakash commented 11 months ago

We also tried using s3fs and no luck with that unfortunately

ajnisbet commented 11 months ago

It looks like the files are at data/dataset rather than data/s3mount/dataset, could you try updating config.yaml to match?

You could also try an absolute path: /app/data/dataset

ajnisbet commented 8 months ago

It looks like the files are at data/dataset rather than data/s3mount/dataset, could you try updating config.yaml to match?

You could also try an absolute path: /app/data/dataset

Closing assuming this was the issue.