Update python-package-conda.yml #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Package using Conda | |
on: [push] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.8' | |
- name: Add conda to system path | |
run: | | |
echo $CONDA/bin >> $GITHUB_PATH | |
- name: Create conda environment | |
run: | | |
conda create -n 2DIR python=3.8 -y | |
conda activate 2DIR | |
- name: Install PyTorch and dependencies via conda | |
run: | | |
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch -y | |
- name: Install dependencies from requirements.txt | |
run: | | |
pip install -r ./install/requirements.txt | |
- name: Lint with flake8 | |
run: | | |
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 | |
run: | | |
conda install pytest -y | |
pytest |