mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
add conda pkgs cache, remove conda env cache
also directly setup correct conda env
This commit is contained in:
parent
bd3ba596c2
commit
ea65650883
30
.github/workflows/test-invoke-conda.yml
vendored
30
.github/workflows/test-invoke-conda.yml
vendored
@ -26,6 +26,8 @@ jobs:
|
|||||||
default-shell: bash -l {0}
|
default-shell: bash -l {0}
|
||||||
name: Test invoke.py on ${{ matrix.os }} with ${{ matrix.stable-diffusion-model }}
|
name: Test invoke.py on ${{ matrix.os }} with ${{ matrix.stable-diffusion-model }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
CONDA_ENV_NAME: invokeai
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: ${{ matrix.default-shell }}
|
shell: ${{ matrix.default-shell }}
|
||||||
@ -33,11 +35,17 @@ jobs:
|
|||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: setup miniconda
|
- name: Cache conda packages
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/conda_pkgs_dir
|
||||||
|
key: conda-pkgs-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles(matrix.environment-file) }}
|
||||||
|
|
||||||
|
- name: Activate Conda Env
|
||||||
uses: conda-incubator/setup-miniconda@v2
|
uses: conda-incubator/setup-miniconda@v2
|
||||||
with:
|
with:
|
||||||
auto-activate-base: false
|
activate-environment: ${{ env.CONDA_ENV_NAME }}
|
||||||
auto-update-conda: false
|
environment-file: ${{ matrix.environment-file }}
|
||||||
miniconda-version: latest
|
miniconda-version: latest
|
||||||
|
|
||||||
- name: set test prompt to main branch validation
|
- name: set test prompt to main branch validation
|
||||||
@ -52,9 +60,6 @@ jobs:
|
|||||||
if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/development' }}
|
if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/development' }}
|
||||||
run: echo "TEST_PROMPTS=tests/validate_pr_prompt.txt" >> $GITHUB_ENV
|
run: echo "TEST_PROMPTS=tests/validate_pr_prompt.txt" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: set conda environment name
|
|
||||||
run: echo "CONDA_ENV_NAME=invokeai" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Use Cached Stable Diffusion Model
|
- name: Use Cached Stable Diffusion Model
|
||||||
id: cache-stable-diffusion-model
|
id: cache-stable-diffusion-model
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
@ -76,19 +81,6 @@ jobs:
|
|||||||
-o models/ldm/stable-diffusion-v1/model.ckpt \
|
-o models/ldm/stable-diffusion-v1/model.ckpt \
|
||||||
-L ${{ matrix.stable-diffusion-model }}
|
-L ${{ matrix.stable-diffusion-model }}
|
||||||
|
|
||||||
- name: Cache Conda env
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ${{ env.CONDA }}/envs
|
|
||||||
key: conda-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles(matrix.environment-file) }}
|
|
||||||
id: cache-conda-pkgs
|
|
||||||
|
|
||||||
- name: Activate Conda Env
|
|
||||||
uses: conda-incubator/setup-miniconda@v2
|
|
||||||
with:
|
|
||||||
activate-environment: ${{ env.CONDA_ENV_NAME }}
|
|
||||||
environment-file: ${{ matrix.environment-file }}
|
|
||||||
|
|
||||||
- name: Use Cached Huggingface and Torch models
|
- name: Use Cached Huggingface and Torch models
|
||||||
id: cache-hugginface-torch
|
id: cache-hugginface-torch
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
Loading…
Reference in New Issue
Block a user