Skip to content

Commit

Permalink
Update python-package-conda.yml
Browse files Browse the repository at this point in the history
Signed-off-by: ZhuLvs <[email protected]>
  • Loading branch information
ZhuLvs authored Oct 21, 2024
1 parent 55190da commit ca1595d
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
@@ -11,46 +11,36 @@ jobs:
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: Install Miniconda
uses: goanpeca/setup-miniconda@v2
with:
auto-activate-base: false
auto-activate-base: false

- name: Create conda environment
run: |
conda init bash
source ~/.bashrc # This reloads the shell with conda initialized
conda create -n 2DIR python=3.8 -y
run: conda create -n 2DIR python=3.8 -y

- name: Activate conda environment and install PyTorch
shell: bash -l {0}
run: |
source ~/.bashrc
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: |
source ~/.bashrc
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

0 comments on commit ca1595d

Please sign in to comment.