-
Notifications
You must be signed in to change notification settings - Fork 159
slurm: set containerd root to EBS #914
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 |
|---|---|---|
|
|
@@ -56,6 +56,8 @@ sudo usermod -aG docker ubuntu | |
| # See: https://github.com/aws-samples/awsome-distributed-training/issues/127 | ||
| # | ||
| # Docker workdir doesn't like Lustre. Tried with storage driver overlay2, fuse-overlayfs, & vfs. | ||
| # Also, containerd ships with a commented root in its default config; we need to ensure an | ||
| # uncommented root that points to the fast local volume. | ||
| if [[ $(mount | grep /opt/sagemaker) ]]; then | ||
| cat <<EOL >> /etc/docker/daemon.json | ||
| { | ||
|
|
@@ -66,6 +68,14 @@ EOL | |
| sed -i \ | ||
| 's|^\[Service\]$|[Service]\nEnvironment="DOCKER_TMPDIR=/opt/sagemaker/docker/tmp"|' \ | ||
| /usr/lib/systemd/system/docker.service | ||
|
|
||
| # Ensure containerd config exists and point its root to /opt/sagemaker | ||
| if [[ ! -f /etc/containerd/config.toml ]]; then | ||
| containerd config default | sudo tee /etc/containerd/config.toml >/dev/null | ||
| fi | ||
| sudo sed -i \ | ||
| -e 's|^#\\?root *=.*|root = "/opt/sagemaker/docker/containerd"|' \ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you use |
||
| /etc/containerd/config.toml | ||
| elif [[ $(mount | grep /opt/dlami/nvme) ]]; then | ||
| cat <<EOL >> /etc/docker/daemon.json | ||
| { | ||
|
|
@@ -76,7 +86,16 @@ EOL | |
| sed -i \ | ||
| 's|^\[Service\]$|[Service]\nEnvironment="DOCKER_TMPDIR=/opt/dlami/nvme/docker/tmp"|' \ | ||
| /usr/lib/systemd/system/docker.service | ||
|
|
||
| # Ensure containerd config exists and point its root to /opt/dlami/nvme | ||
| if [[ ! -f /etc/containerd/config.toml ]]; then | ||
| containerd config default | sudo tee /etc/containerd/config.toml >/dev/null | ||
| fi | ||
| sudo sed -i \ | ||
| -e 's|^#\\?root *=.*|root = "/opt/dlami/nvme/docker/containerd"|' \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tested these changes but it didn't work but the below did |
||
| /etc/containerd/config.toml | ||
| fi | ||
|
|
||
| systemctl daemon-reload | ||
| systemctl restart docker | ||
| systemctl restart containerd | ||
| systemctl restart docker | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested these changes but it didn't work but the below did
sudo sed -i -e 's|^#\?root *=.*|root = "/opt/sagemaker/docker/containerd"|'