@@ -60,10 +60,12 @@ jobs:
6060 pip install --no-compile -r pytorch-cpu-requirements.txt
6161 pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/
6262
63- # Update to the latest iree packages.
64- pip install -f https://iree.dev/pip-release-links.html --upgrade --pre \
65- iree-base-compiler iree-base-runtime --src deps \
66- -e "git+https://github.com/iree-org/iree-turbine.git#egg=iree-turbine"
63+ # Install nightly IREE packages.
64+ # We could also pin to a known working or stable version.
65+ pip install -f https://iree.dev/pip-release-links.html --pre \
66+ iree-base-compiler \
67+ iree-base-runtime \
68+ iree-turbine
6769
6870 - name : Run sharktank tests
6971 if : ${{ !cancelled() }}
8385 run :
8486 shell : bash
8587 env :
86- PIP_CACHE_DIR : " ${{ github.workspace }}/.pip-cache "
88+ VENV_DIR : ${{ github.workspace }}/.venv
8789 HF_HOME : " /data/huggingface"
8890 steps :
8991 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -94,37 +96,31 @@ jobs:
9496 with :
9597 python-version : ${{matrix.version}}
9698
97- - name : Cache Pip Packages
98- uses : actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
99- id : cache-pip
100- with :
101- path : ${{ env.PIP_CACHE_DIR }}
102- key : pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','sharktank/requirements*.txt') }}
99+ - name : Create Python venv
100+ run : python -m venv ${VENV_DIR}
103101
104102 - name : Install sharktank deps
105103 run : |
104+ source ${VENV_DIR}/bin/activate
106105 python -m pip install --no-compile --upgrade pip
107106 # Note: We install in three steps in order to satisfy requirements
108107 # from non default locations first. Installing the PyTorch CPU
109108 # wheels saves multiple minutes and a lot of bandwidth on runner setup.
110109 pip install --no-compile -r pytorch-cpu-requirements.txt
111110 pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/
112111
113- # Install latest iree-tubrine.
114- pip install --no-compile -f https://iree.dev/pip-release-links.html --src deps \
115- -e "git+https://github.com/iree-org/iree-turbine.git#egg=iree-turbine"
116-
117- # Try with the latest IREE nightly releases, not what iree-turbine pins.
112+ # Install nightly IREE packages.
118113 # We could also pin to a known working or stable version.
119- # This should eventually stabilize. Do the best we can for now.
120- pip install -f https://iree.dev/pip-release-links.html --upgrade --pre \
114+ pip install -f https://iree.dev/pip-release-links.html --pre --upgrade \
121115 iree-base-compiler \
122- iree-base-runtime
116+ iree-base-runtime \
117+ iree-turbine
123118
124119 - name : Run tests
125120 # TODO: unify with-t5-data and with-clip-data flags into a single flag
126121 # and make it possible to run only tests that require data.
127122 run : |
123+ source ${VENV_DIR}/bin/activate
128124 pytest \
129125 --with-clip-data \
130126 --with-t5-data \
@@ -162,10 +158,13 @@ jobs:
162158 # wheels saves multiple minutes and a lot of bandwidth on runner setup.
163159 pip install --no-compile -r pytorch-cpu-requirements.txt
164160 pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/
165- # Update to the latest iree packages.
166- pip install -f https://iree.dev/pip-release-links.html --upgrade --pre \
167- iree-base-compiler iree-base-runtime --src deps \
168- -e "git+https://github.com/iree-org/iree-turbine.git#egg=iree-turbine"
161+
162+ # Install nightly IREE packages.
163+ # We could also pin to a known working or stable version.
164+ pip install -f https://iree.dev/pip-release-links.html --pre --upgrade \
165+ iree-base-compiler \
166+ iree-base-runtime \
167+ iree-turbine
169168 - name : Run punet tests
170169 run : |
171170 pytest -v sharktank/ -m punet_quick \
0 commit comments