Skip to content

Commit

Permalink
Switch docker env creation to pip
Browse files Browse the repository at this point in the history
  • Loading branch information
lrzpellegrini committed Feb 7, 2024
1 parent 2fb1922 commit 4766653
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/environment-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,28 @@ jobs:
run: |
mamba create -n avalanche-env -y -v python=${{ matrix.python-version }} -c conda-forge &&
conda run -n avalanche-env --no-capture-output pip install -r requirements.txt
- name: download datasets
env:
FAST_TEST: "True"
USE_GPU: "False"
PYTHONPATH: ${{ github.workspace }}
shell: bash -l -c "conda run -n avalanche-env --no-capture-output bash {0}"
run: |
pip install pytest-xdist &&
pytest ./tests/benchmarks/scenarios/deprecated/test_high_level_generators.py::HighLevelGeneratorTests::test_filelist_benchmark ./tests/benchmarks/scenarios/deprecated/test_nc_mt_scenario.py::MultiTaskTests::test_mt_single_dataset
- name: python unit test
id: unittest
env:
FAST_TEST: "True"
USE_GPU: "False"
PYTHONPATH: ${{ github.workspace }}
shell: bash -l -c "conda run -n avalanche-env --no-capture-output bash {0}"
run: |
python -m unittest discover tests &&
pytest -n 4 tests &&
echo "Running checkpointing tests..." &&
bash ./tests/checkpointing/test_checkpointing.sh &&
echo "Running distributed training tests..." &&
cd tests &&
PYTHONPATH=.. python run_dist_tests.py &&
cd ..
python run_dist_tests.py
- name: checkout avalanche-docker repo
if: always()
uses: actions/checkout@v3
Expand All @@ -80,7 +88,8 @@ jobs:
shell: bash -l -c "conda run -n avalanche-env --no-capture-output bash {0}"
run: |
rm -f avalanche-docker/${{ matrix.python-version }}/environment-${{ matrix.python-version }}.yml &&
conda env export > $"avalanche-docker/"${{ matrix.python-version }}"/environment-"${{ matrix.python-version }}".yml" &&
rm -f avalanche-docker/${{ matrix.python-version }}/requirements-${{ matrix.python-version }}.txt &&
pip freeze > $"avalanche-docker/"${{ matrix.python-version }}"/requirements-"${{ matrix.python-version }}".txt"
cd avalanche-docker &&
git config --local user.email ${{ secrets.BOT_EMAIL }} &&
git config --local user.name ${{ secrets.BOT_NAME }} &&
Expand Down

0 comments on commit 4766653

Please sign in to comment.