Code Monkey home page Code Monkey logo

Comments (2)

dhkim0225 avatar dhkim0225 commented on June 26, 2024 1

도움이 되실 수 있을 것 같아, 자주 사용하는 config 공유 드립니다.

name: CI

on: pull_request

jobs:
  black:
    runs-on: [self-hosted, cpu]
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Setup python
      uses: actions/setup-python@v2
      with:
        python-version: 3.9
    - name: Upgrade pip
      run: pip install --upgrade pip
    - name: Install black
      run: pip install --upgrade black==21.9b0
    - name: Run black
      run: black --check . --extend-exclude crafts_pytorch/third_party

  isort:
    runs-on: [self-hosted, cpu]
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Setup python
      uses: actions/setup-python@v2
      with:
        python-version: 3.9
    - name: Upgrade pip
      run: pip install --upgrade pip
    - name: Install isort
      run: pip install --upgrade isort==5.9.3
    - name: Run isort
      working-directory: ./crafts_pytorch
      run: isort --profile black --check --skip third_party .

  mypy:
    runs-on: [self-hosted, cpu]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Setup python
        uses: actions/setup-python@v2
        with:
          python-version: 3.9
      - name: Upgrade pip
        run: pip install --upgrade pip
      - name: Install mypy
        run: pip install --upgrade mypy==0.910 types-requests==2.25.9 types-ujson==0.1.1
      - name: Run mypy
        run: mypy --ignore-missing-imports . --exclude third_party

  pylint:
    runs-on: [self-hosted, cpu]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Setup python
        uses: actions/setup-python@v2
        with:
          python-version: 3.9
      - name: Upgrade pip
        run: pip install --upgrade pip
      - name: Install pylint
        run: pip install --upgrade pylint==2.11.1
      - name: Run pylint
        run: pylint *

  pytest:
    runs-on: [self-hosted, gpu]
    container:
      image: dhkim0225/dl:cu102_pytorch1.9.0_py39_21.08
      volumes:
        - /mnt/cmlssd004:/mnt/cmlssd004
        - /mnt/ocr-nfsx1:/mnt/ocr-nfsx1
        - /home1/irteamsu/nsml-local:/nsml-local
      options: --gpus all --memory=64G --shm-size=32G
    steps:
    - name: Update GIT for submodule checkout
      run: add-apt-repository ppa:git-core/ppa -y && apt update && apt install --upgrade -y git
    - name: Checkout with submodule
      uses: actions/checkout@v2
      with:
        token: ${{ secrets.CI_USER_PAT }}
        submodules: recursive
    - name: Upgrade pip
      run: pip install --upgrade pip
    - name: Install Local NSML
      run: pip install /nsml-local
    - name: Install requirements
      run: pip install -r ./crafts_pytorch/requirements.txt
    - name: Install other stuffs
      run: pip install munch pynubes --trusted-host pypi.clova.ai --index-url http://pypi.clova.ai
    - name: Run pytest
      working-directory: ./crafts_pytorch
      run: pytest --ignore=third_party

from lassl.

seopbo avatar seopbo commented on June 26, 2024

도움이 되실 수 있을 것 같아, 자주 사용하는 config 공유 드립니다.

name: CI

on: pull_request

jobs:
  black:
    runs-on: [self-hosted, cpu]
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Setup python
      uses: actions/setup-python@v2
      with:
        python-version: 3.9
    - name: Upgrade pip
      run: pip install --upgrade pip
    - name: Install black
      run: pip install --upgrade black==21.9b0
    - name: Run black
      run: black --check . --extend-exclude crafts_pytorch/third_party

  isort:
    runs-on: [self-hosted, cpu]
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Setup python
      uses: actions/setup-python@v2
      with:
        python-version: 3.9
    - name: Upgrade pip
      run: pip install --upgrade pip
    - name: Install isort
      run: pip install --upgrade isort==5.9.3
    - name: Run isort
      working-directory: ./crafts_pytorch
      run: isort --profile black --check --skip third_party .

  mypy:
    runs-on: [self-hosted, cpu]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Setup python
        uses: actions/setup-python@v2
        with:
          python-version: 3.9
      - name: Upgrade pip
        run: pip install --upgrade pip
      - name: Install mypy
        run: pip install --upgrade mypy==0.910 types-requests==2.25.9 types-ujson==0.1.1
      - name: Run mypy
        run: mypy --ignore-missing-imports . --exclude third_party

  pylint:
    runs-on: [self-hosted, cpu]
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Setup python
        uses: actions/setup-python@v2
        with:
          python-version: 3.9
      - name: Upgrade pip
        run: pip install --upgrade pip
      - name: Install pylint
        run: pip install --upgrade pylint==2.11.1
      - name: Run pylint
        run: pylint *

  pytest:
    runs-on: [self-hosted, gpu]
    container:
      image: dhkim0225/dl:cu102_pytorch1.9.0_py39_21.08
      volumes:
        - /mnt/cmlssd004:/mnt/cmlssd004
        - /mnt/ocr-nfsx1:/mnt/ocr-nfsx1
        - /home1/irteamsu/nsml-local:/nsml-local
      options: --gpus all --memory=64G --shm-size=32G
    steps:
    - name: Update GIT for submodule checkout
      run: add-apt-repository ppa:git-core/ppa -y && apt update && apt install --upgrade -y git
    - name: Checkout with submodule
      uses: actions/checkout@v2
      with:
        token: ${{ secrets.CI_USER_PAT }}
        submodules: recursive
    - name: Upgrade pip
      run: pip install --upgrade pip
    - name: Install Local NSML
      run: pip install /nsml-local
    - name: Install requirements
      run: pip install -r ./crafts_pytorch/requirements.txt
    - name: Install other stuffs
      run: pip install munch pynubes --trusted-host pypi.clova.ai --index-url http://pypi.clova.ai
    - name: Run pytest
      working-directory: ./crafts_pytorch
      run: pytest --ignore=third_party

감사합니다. 도입할 때 많이 참고하겠습니다 🤗 to: @dhkim0225

from lassl.

Related Issues (20)

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.