Hello Github Actions,
We are using Github Action to build our TensorFlow docker images. We’ve seen that some actions are failing on “out of disk space” error.
#12 58.88 Downloading tensorflow-1.15.2-cp37-cp37m-manylinux2010_x86_64.whl (110.5 MB)
**#12 70.86 ERROR: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device**#12 70.86
#12 ERROR: executor failed running [/bin/bash -c python3.7 -m pip install --upgrade pip && python3.7 -m pip install -r requirements-gpu.txt]: runc did not terminate sucessfully
------
> [6/6] RUN --mount=type=ssh python3.7 -m pip install --upgrade pip && python3.7 -m pip install -r requirements-gpu.txt:
------
failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: rpc error: code = Unknown desc = failed to build LLB: executor failed running [/bin/bash -c python3.7 -m pip install --upgrade pip && python3.7 -m pip install -r requirements-gpu.txt]: runc did not terminate sucessfully
##[error]Process completed with exit code 1.
While debugging this we’ve discovred that the 20GB space provided by the build worker is mounted under /mnt while the docker daemon is configued to use /var/lib/docker on the root fs which has ~7GB of free space.
To workaround this issue we’ve added a docker configuartion step to have it use the /mnt folder instead of the the /var/lib disk location.
Pleae find here for the benefit of the community:
steps:
- name: Patch Docker Daemon data-root
run: |
DOCKER_DATA_ROOT='/mnt/var/lib/docker'
DOCKER_DAEMON_JSON='/etc/docker/daemon.json'
sudo mkdir -p "${DOCKER_DATA_ROOT}"
jq --arg dataroot "${DOCKER_DATA_ROOT}" '. + {"data-root": $dataroot}' "${DOCKER_DAEMON_JSON}" > "/tmp/docker.json.tmp"
sudo mv "/tmp/docker.json.tmp" "${DOCKER_DAEMON_JSON}"
sudo systemctl restart docker
I would be happy to have the worker by deafult set to use the /mnt path, or perhpas even better have the deafult “/” mount disk extended to include +20GB of storage data which would eliviate the need to configure this custom path (as it’s likely that other tools will use /var path as well reaching the same issue as described above.