|
21 | 21 | TORCH_VERSION: 1.12.0 |
22 | 22 | # TORCH_CPU_INSTALL: conda install pytorch torchvision torchaudio cpuonly -c pytorch |
23 | 23 | # TORCH_GPU_INSTALL: conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch |
24 | | - TORCH_CPU_INSTALL: pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu |
25 | | - TORCH_GPU_INSTALL: pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113 |
| 24 | + TORCH_CPU_INSTALL: pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu -c constraints.txt |
| 25 | + TORCH_GPU_INSTALL: pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113 -c constraints.txt |
26 | 26 | # Change this to invalidate existing cache. |
27 | 27 | CACHE_PREFIX: v11 |
28 | 28 | # Disable tokenizers parallelism because this doesn't help, and can cause issues in distributed tests. |
@@ -150,7 +150,7 @@ jobs: |
150 | 150 | id: virtualenv-cache |
151 | 151 | with: |
152 | 152 | path: .venv |
153 | | - key: ${{ env.CACHE_PREFIX }}-${{ env.WEEK_NUMBER }}-${{ runner.os }}-${{ env.RUNNER_ARCH }}-${{ env.PYTHON_VERSION }}-${{ matrix.task.torch_platform }}-${{ hashFiles('setup.py') }}-${{ hashFiles('*requirements.txt') }} |
| 153 | + key: ${{ env.CACHE_PREFIX }}-${{ env.WEEK_NUMBER }}-${{ runner.os }}-${{ env.RUNNER_ARCH }}-${{ env.PYTHON_VERSION }}-${{ matrix.task.torch_platform }}-${{ hashFiles('setup.py') }}-${{ hashFiles('*requirements.txt', 'constraints.txt') }} |
154 | 154 |
|
155 | 155 | - name: Setup virtual environment (no cache hit) |
156 | 156 | if: steps.virtualenv-cache.outputs.cache-hit != 'true' |
@@ -276,7 +276,7 @@ jobs: |
276 | 276 | id: virtualenv-cache |
277 | 277 | with: |
278 | 278 | path: .venv |
279 | | - key: ${{ env.CACHE_PREFIX }}-${{ env.WEEK_NUMBER }}-${{ runner.os }}-${{ env.RUNNER_ARCH }}-${{ env.PYTHON_VERSION }}-cpu-${{ hashFiles('setup.py') }}-${{ hashFiles('*requirements.txt') }} |
| 279 | + key: ${{ env.CACHE_PREFIX }}-${{ env.WEEK_NUMBER }}-${{ runner.os }}-${{ env.RUNNER_ARCH }}-${{ env.PYTHON_VERSION }}-cpu-${{ hashFiles('setup.py') }}-${{ hashFiles('*requirements.txt', 'constraints.txt') }} |
280 | 280 |
|
281 | 281 | - name: Setup virtual environment (no cache hit) |
282 | 282 | if: steps.virtualenv-cache.outputs.cache-hit != 'true' |
@@ -377,7 +377,7 @@ jobs: |
377 | 377 |
|
378 | 378 | - name: Install core package |
379 | 379 | run: | |
380 | | - pip install $(ls dist/*.whl)${{ matrix.flavor }} |
| 380 | + pip install $(ls dist/*.whl)${{ matrix.flavor }} -c constraints.txt |
381 | 381 |
|
382 | 382 | - name: Download NLTK prerequisites |
383 | 383 | run: | |
@@ -484,7 +484,7 @@ jobs: |
484 | 484 | id: virtualenv-cache |
485 | 485 | with: |
486 | 486 | path: .venv |
487 | | - key: ${{ env.CACHE_PREFIX }}-${{ env.WEEK_NUMBER }}-${{ runner.os }}-${{ env.RUNNER_ARCH }}-${{ env.PYTHON_VERSION }}-cpu-${{ hashFiles('setup.py') }}-${{ hashFiles('*requirements.txt') }} |
| 487 | + key: ${{ env.CACHE_PREFIX }}-${{ env.WEEK_NUMBER }}-${{ runner.os }}-${{ env.RUNNER_ARCH }}-${{ env.PYTHON_VERSION }}-cpu-${{ hashFiles('setup.py') }}-${{ hashFiles('*requirements.txt', 'constraints.txt') }} |
488 | 488 |
|
489 | 489 | - name: Setup virtual environment (no cache hit) |
490 | 490 | if: steps.virtualenv-cache.outputs.cache-hit != 'true' |
|
0 commit comments