#2758 - Updated azure-benchmark-pipeline.yaml so that is created a venv on the vm

This commit is contained in:
Christopher McCarthy
2024-07-17 14:33:44 +00:00
parent c7431fa0c8
commit 2900ca9b2a

View File

@@ -22,10 +22,15 @@ jobs:
name: 'Imaginary Yak Pool' name: 'Imaginary Yak Pool'
workspace: workspace:
clean: all clean: all
steps: steps:
- checkout: self - checkout: self
persistCredentials: true persistCredentials: true
- script: |
$(python.version)-m venv venv
displayName: 'Create venv'
- script: | - script: |
VERSION=$(cat src/primaite/VERSION | tr -d '\n') VERSION=$(cat src/primaite/VERSION | tr -d '\n')
if [[ "$(Build.SourceBranch)" == "refs/heads/dev" ]]; then if [[ "$(Build.SourceBranch)" == "refs/heads/dev" ]]; then
@@ -41,21 +46,18 @@ jobs:
echo "##vso[task.setvariable variable=MAJOR_VERSION]$MAJOR_VERSION" echo "##vso[task.setvariable variable=MAJOR_VERSION]$MAJOR_VERSION"
displayName: 'Set Version Variables' displayName: 'Set Version Variables'
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
addToPath: true
- script: | - script: |
python3.10 -m pip install --upgrade pip source venv/bin/activate
python3.10 -m pip install -e .[dev,rl] pip install --upgrade pip
pip install -e .[dev,rl]
primaite setup primaite setup
displayName: 'Install Dependencies' displayName: 'Install Dependencies'
- script: | - script: |
set -e set -e
source venv/bin/activate
cd benchmark cd benchmark
python3.10 -m pip primaite_benchmark.py python primaite_benchmark.py
cd .. cd ..
displayName: 'Run Benchmarking Script' displayName: 'Run Benchmarking Script'