-
Notifications
You must be signed in to change notification settings - Fork 73
Mount GCS via single host gcsfuse and expose in container #2294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,6 +57,11 @@ docker: | |
| initialization_commands: | ||
| - which docker || (curl -fsSL https://get.docker.com -o get-docker.sh; sudo sh get-docker.sh; sudo usermod -aG docker $USER; sudo systemctl restart docker -f) | ||
| - yes | gcloud auth configure-docker us-east5-docker.pkg.dev | ||
| - which gcsfuse || (sudo apt-get update && sudo apt-get install -y curl gnupg && sudo mkdir -p /etc/apt/keyrings && curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/cloud.google.gpg && echo "deb [signed-by=/etc/apt/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt gcsfuse-$(. /etc/os-release && echo $VERSION_CODENAME) main" | sudo tee /etc/apt/sources.list.d/gcsfuse.list >/dev/null && sudo apt-get update && sudo apt-get install -y gcsfuse) | ||
| - sudo sh -c "grep -q '^user_allow_other$' /etc/fuse.conf 2>/dev/null || echo user_allow_other >> /etc/fuse.conf" | ||
| - if [ -e /tmp/gcsfuse_mount ] && [ ! -d /tmp/gcsfuse_mount ]; then rm -f /tmp/gcsfuse_mount; fi | ||
| - mkdir -p /tmp/gcsfuse_mount | ||
| - gcsfuse --implicit-dirs --client-protocol grpc --cache-dir /dev/shm --file-cache-max-size-mb 160000 --dir-mode 0777 --file-mode 0666 -o allow_other --only-dir gcsfuse_mount marin-us-east5 /tmp/gcsfuse_mount || true | ||
| # always run this because ray doesn't run with sudo | ||
| - sudo usermod -aG docker $USER | ||
| # we want to launch docker containers from inside docker, which means we need to loosen the permissions on the docker | ||
|
|
@@ -87,7 +92,9 @@ setup_commands: | |
| - echo 'export TPU_MIN_LOG_LEVEL=3' >> $HOME/.bashrc | ||
| - echo 'export TPU_STDERR_LOG_LEVEL=3' >> $HOME/.bashrc | ||
| - echo 'export TPU_LOG_DIR=disabled' >> $HOME/.bashrc | ||
| - gcsfuse --implicit-dirs --client-protocol grpc --cache-dir /dev/shm --file-cache-max-size-mb 160000 --only-dir gcsfuse_mount $BUCKET /opt/gcsfuse_mount || true | ||
| # gcsfuse runs on the host (mounted at /tmp/gcsfuse_mount); expose it at the conventional in-container path. | ||
| - if [ -e /opt/gcsfuse_mount ] && [ ! -L /opt/gcsfuse_mount ]; then sudo rm -rf /opt/gcsfuse_mount; fi | ||
| - sudo ln -sfn /tmp/gcsfuse_mount /opt/gcsfuse_mount | ||
|
Comment on lines
+96
to
+97
|
||
|
|
||
| worker_setup_commands: | ||
| # delete any old ray session data | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.