Giter VIP home page Giter VIP logo

set-swap-space's Issues

swapoff: bad usage

Run pierotofy/set-swap-space@master
  with:
    swap-size-gb: 100
Run echo "Memory and swap:"
  echo "Memory and swap:"
  free -h
  echo
  swapon --show
  echo
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
Memory and swap:
               total        used        free      shared  buff/cache   available
Mem:            31Gi       642Mi        28Gi       7.0Mi       2.5Gi        30Gi
Swap:             0B          0B          0B


Run export SWAP_FILE=$(swapon --show=NAME | tail -n 1)
  export SWAP_FILE=$(swapon --show=NAME | tail -n 1)
  sudo swapoff $SWAP_FILE
  sudo rm $SWAP_FILE
  sudo fallocate -l 100G $SWAP_FILE
  sudo chmod 600 $SWAP_FILE
  sudo mkswap $SWAP_FILE
  sudo swapon $SWAP_FILE
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
swapoff: bad usage
Try 'swapoff --help' for more information.
Error: Process completed with exit code 16.

Only happens on a large runner (ubuntu-latest-8-cores), works fine on regular runners (ubuntu-latest).

Fails with `swapoff: Not superuser` when running inside container

Running set-swap-space on Github Actions with the container directive here throws an error about superuser permissions.

MRE:

  run_tester:
    runs-on: ubuntu-latest

    container:
      image: singlecellopenproblems/openproblems-github-actions:latest
      volumes:
        - /var/run/docker.sock:/var/run/docker.sock
        - /tmp:/tmp
      options: --user root

    steps:

    - name: Set Swap Space
      uses: pierotofy/set-swap-space@master
      with:
        swap-size-gb: 10

Traceback:

Run pierotofy/set-swap-space@master
  with:
    swap-size-gb: 10
Run echo "Memory and swap:"
  echo "Memory and swap:"
  free -h
  echo
  swapon --show
  echo
  shell: bash --noprofile --norc -e -o pipefail {0}
Memory and swap:
               total        used        free      shared  buff/cache   available
Mem:           6.8Gi       794Mi       953Mi       9.0Mi       5.1Gi       5.7Gi
Swap:          4.0Gi        20Mi       4.0Gi

NAME          TYPE SIZE  USED PRIO
/mnt/swapfile file   4G 20.1M   -2

Run export SWAP_FILE=$(swapon --show=NAME | tail -n 1)
  export SWAP_FILE=$(swapon --show=NAME | tail -n 1)
  sudo swapoff $SWAP_FILE
  sudo rm $SWAP_FILE
  sudo fallocate -l 10G $SWAP_FILE
  sudo chmod 600 $SWAP_FILE
  sudo mkswap $SWAP_FILE
  sudo swapon $SWAP_FILE
  shell: bash --noprofile --norc -e -o pipefail {0}
swapoff: Not superuser.
Error: Process completed with exit code 1[6](https://github.com/giovp/SingleCellOpenProblems/runs/6494687199?check_suite_focus=true#step:11:6).

Windows support

Would be possible? I receive a free command not found on a windows runner

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.