Open davejscott opened 2 years ago
@DmitriGekhtman tagging you here for this particular bug.
I was able to get an EFS share mounted in the docker container with the following modifications to my YAML file.
To get the EFS mounted to the EC2 host I moved the EFS setup to *initialization_commands". I had to install a newer version of Python 3 as the image default python3 is 3.6 which causes the mount command to fail due to the deprecation of Python 3.6.
initialization_commands:
- sudo kill -9 `sudo lsof /var/lib/dpkg/lock-frontend | awk '{print $2}' | tail -n 1`;
sudo pkill -9 apt-get;
sudo pkill -9 dpkg;
sudo dpkg --configure -a;
sudo apt-get -y install python3.8;
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1;
sudo apt-get -y install binutils;
cd $HOME;
git clone https://github.com/aws/efs-utils;
cd $HOME/efs-utils;
./build-deb.sh;
sudo apt-get -y install ./build/amazon-efs-utils*deb;
cd $HOME;
sudo mkdir /mnt/efs;
sudo mount -t efs { EFS File System ID }:/ /mnt/efs;
sudo chmod 777 /mnt/efs;
The following will mount the /mnt/efs directory on the EC2 host to /mnt/efs in the container
docker:
....
run_options:
- --volume /mnt/efs:/mnt/efs
Many thanks for the solution. I manage to mount efs to ec2 and container
one comment, if Amazon Linux 2 is used, we have to replace apt-get by yum
What happened + What you expected to happen
Following this documentation page: https://docs.ray.io/en/latest/cluster/aws-tips.html#
I'm trying to mount an EFS to a ray cluster. When I follow the documentation instructions above, I'm not able to mount an EFS directory. The expected behaviour is the ability to mount an EFS drive and utilize it. I utilized the following documentation from AWS to set up my EFS, including security groups https://docs.aws.amazon.com/efs/latest/ug/wt1-create-ec2-resources.html. It appears from the bug that there are some issues mounting the drive.
If you utilize ubuntu user, the drive is capable of being mounted. When using
ray attach maskrcnn-efs-mount.yaml
and trying to manually attach the drive, it also provides the same result of mount.nfs4: Operation not permitted.Example Yaml:
Outcome after running
ray up maskrcnn-efs-mount.yaml
Versions / Dependencies
Ray 1.13.0 Python 3.7
Reproduction script
ray up maskrcnn-efs-mount.yaml
with the yaml file attached above should help to reproduce the script.Issue Severity
High: It blocks me from completing my task.