gdal-docker
gdal-docker copied to clipboard
Cannot open files via host mounted Network File System volume.
trafficstars
I am trying to run this volume mounted docker container on top of a host which has an NFS. However, whenever I use the python gdal.Open command on a file that exists, it will hang indefinitely.
Here are the commands to reproduce the issue using amazon EFS
- Spin up a machine and mount the EFS file system.
mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 <your-fs-id>.efs.<your-region.amazonaws.com:/ /mnt/efs
- Run the container and mount the NFS volume
sudo docker run -it -v /mnt/efs:/mnt/efs geodata/gdal /bin/bash
- Run the gdal.Open command in python
from osgeo import gdal
gdal.Open("/mnt/efs/<file>")
Interestingly I can run os level commands on files in the EFS no problem. For example if I copy the /mnt/efs/<file> into a local directory. The gdal command works fine on the local file.
I have a similar issue When I run gdal on a file in /root/volume which is a folder mounted as a docker volume from the root filesystem gdal fails with ERROR 4 When i move that file to /tmp the gdla commands work