Set up tgi environment values with the ones used to build the model #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Optimum neuron / TGI integration tests on INF2 | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
paths: | |
- "setup.py" | |
- "optimum/**.py" | |
- "text-generation-inference/**" | |
pull_request: | |
branches: [ main ] | |
paths: | |
- "setup.py" | |
- "optimum/**.py" | |
- "text-generation-inference/**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
do-the-job: | |
name: Run TGI integration tests | |
runs-on: [self-hosted, 1-aws-inf2, 32-cpu, ci] # run the job on the newly created runner | |
env: | |
AWS_REGION: us-east-1 | |
steps: | |
- name: Misc installs | |
shell: bash | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y wget sudo gnupg | |
- name: Install Neuron runtime | |
shell: bash | |
run: | | |
. /etc/os-release | |
sudo tee /etc/apt/sources.list.d/neuron.list > /dev/null <<EOF | |
deb https://apt.repos.neuron.amazonaws.com ${VERSION_CODENAME} main | |
EOF | |
wget -qO - https://apt.repos.neuron.amazonaws.com/GPG-PUB-KEY-AMAZON-AWS-NEURON.PUB | sudo apt-key add - | |
sudo apt-get update -y | |
sudo apt-get install aws-neuronx-tools=2.17.0.0 aws-neuronx-oci-hook=2.2.45.0 aws-neuronx-runtime-lib=2.20.11.0-b7d33e68b aws-neuronx-collectives=2.20.11.0-c101c322e -y | |
export PATH=/opt/aws/neuron/bin:$PATH | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install python and create venv | |
shell: bash | |
run: | | |
sudo apt install python3.8-venv -y | |
python3 -m venv aws_neuron_venv_pytorch | |
source aws_neuron_venv_pytorch/bin/activate | |
python -m pip install -U pip | |
python -m pip config set global.extra-index-url https://pip.repos.neuron.amazonaws.com | |
python -m pip install build | |
- name: Run integration tests | |
shell: bash | |
run: | | |
# gawk is required when invoking the Makefile targets | |
sudo apt install gawk -y | |
source aws_neuron_venv_pytorch/bin/activate | |
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} make tgi_docker_test |