Skip to content

Update python-package-conda.yml #37

Update python-package-conda.yml

Update python-package-conda.yml #37

name: Python Package using Conda
on: [push]
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v4
- name: Install Miniconda
uses: goanpeca/setup-miniconda@v2
with:
auto-activate-base: false
- name: Create conda environment
run: conda create -n 2DIR python=3.8 -y
- name: Activate conda environment and install PyTorch
shell: bash -l {0}
run: |
conda activate 2DIR
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch -y
- name: Install dependencies from requirements.txt
shell: bash -l {0}
run: |
conda activate 2DIR
pip install -r ./install/requirements.txt
- name: Lint with flake8
shell: bash -l {0}
run: |
conda activate 2DIR
conda install flake8 -y
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
shell: bash -l {0}
run: |
conda activate 2DIR
conda install pytest -y
pytest