Skip to content
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

I need additional storage space, the current storage space is a bit small. #10237

Closed
2 of 13 tasks
siaimes opened this issue Jul 16, 2024 · 3 comments
Closed
2 of 13 tasks
Assignees

Comments

@siaimes
Copy link

siaimes commented Jul 16, 2024

Description

https://github.com/siaimes/pytorch/actions

I installed some additional components based on the official pytorch image for my own use. There was no problem with pytorch 2.0 and before. Recently, I wanted to upgrade to 2.3.1 and found that the action failed to run. The error message was "no space left on device" when pulling the image.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

https://github.com/siaimes/pytorch/actions

Is it regression?

No

Expected behavior

Create and publish a Docker image #70: Commit fca23d7 pushed by siaimes

Actual behavior

buildx failed with: ERROR: failed to solve: failed to register layer: write /opt/conda/lib/libnppial.so.11.8.0.86: no space left on device

Repro steps

https://github.com/siaimes/pytorch

@siaimes siaimes changed the title I requested additional storage space, the current storage space is a bit small. I need additional storage space, the current storage space is a bit small. Jul 16, 2024
@Prabhatkumar59
Copy link

Hi @siaimes-- Thank you for bringing this issue to us. We are looking into this issue and will update you shortly on this after investigating.

@Prabhatkumar59
Copy link

Prabhatkumar59 commented Jul 16, 2024

Hi @siaimes -

Here is the resolution approach for "no space left on device" Error:-

The "no space left on device" error indicates that the runner's disk is full. Below are the detailed steps to resolve this issue:

  1. Free Up Space on the Runner:-

    a. Clear Cached Data
    Ensure that there is no unnecessary cached data taking up space on the runner:

jobs:
  build:
    runs-on: ubuntu-24.04
    steps:
    - name: Clear Docker Cache
      run: docker system prune -a -f

b. Remove Unused Docker Images:
Unused Docker images can take up a significant amount of space. The following command removes all unused Docker images, networks, and caches.

`jobs:
build:
  runs-on: ubuntu-24.04
  steps:
  - name: Remove Unused Docker Images
    run: docker system prune -a -f

`
2.Increase Disk Space on the Runner:-

a. Self-Hosted Runners
If you are using self-hosted runners, you can increase the disk size of the machine. Follow the documentation specific to your cloud provider or on-premise server to resize the disk.

b. GitHub-Hosted Runners
Consider using larger runners which come with more disk space. You can specify a larger runner in your workflow configuration

jobs:
  build:
    runs-on: [larger runner specification]

  1. Split the Workflow:
    You can also split the workflow into multiple jobs to ensure that individual jobs do not exceed disk space limits.
`jobs:
  build:
    runs-on: ubuntu-24.04
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Build Docker Image
      run: docker build -t myimage:24.04

  test:
    runs-on: ubuntu-24.04
    needs: build
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Test Docker Image
      run: docker run myimage:24.04 pytest

`
Adding summary for you as well:-
To resolve the "no space left on device" error, you should:

  1. Free up space on the runner by clearing cached data and removing unused Docker images.
    Optimize your Docker image size using multi-stage builds and removing unnecessary packages.
    Increase disk space on the runner by resizing the disk for self-hosted runners or using larger GitHub-hosted runners.

  2. Use external storage for large artifacts.
    Split the workflow into multiple jobs.

Hopefully by following these steps, you should be able to successfully build and publish your Docker image without encountering disk space issues.

@siaimes
Copy link
Author

siaimes commented Jul 17, 2024

@Prabhatkumar59 Thank you for your advice, the problem has been solved.

      - name: Clean runner
        run: |
          docker builder prune -f
          docker system prune -a -f
          rm -rf /usr/share/dotnet
          rm -rf /opt/ghc
          rm -rf "/usr/local/share/boost"
          rm -rf "$AGENT_TOOLSDIRECTORY"

@siaimes siaimes closed this as completed Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants