Create instance #75
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: Create instance | |
on: | |
workflow_dispatch: | |
inputs: | |
modelName: | |
description: 'The model to use' | |
required: true | |
default: 'llama3.1' | |
instanceNameSuffix: | |
description: 'Instance name suffix' | |
required: false | |
default: '' | |
ovhInstanceFlavorName: | |
description: 'OVH GPU instance flavor name' | |
required: true | |
default: 'l4-180' | |
ovhInstanceImageName: | |
description: 'OVH instance image name' | |
required: true | |
default: 'NVIDIA GPU Cloud (NGC)' | |
ovhInstanceRegion: | |
description: 'OVH instance region' | |
required: true | |
default: 'GRA11' | |
jobs: | |
create-instance: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install dependencies | |
run: poetry install | |
- name: Get OVH IDs | |
id: get_ovh_ids | |
run: poetry run python get_ovh_ids.py | |
env: | |
OVH_ENDPOINT: ${{ vars.OVH_ENDPOINT }} | |
OVH_INSTANCE_FLAVOR_NAME: ${{ inputs.ovhInstanceFlavorName }} | |
OVH_INSTANCE_IMAGE_NAME: ${{ inputs.ovhInstanceImageName }} | |
OVH_REGION: ${{ inputs.ovhInstanceRegion }} | |
OVH_APPLICATION_KEY: ${{ secrets.OVH_APPLICATION_KEY }} | |
OVH_APPLICATION_SECRET: ${{ secrets.OVH_APPLICATION_SECRET }} | |
OVH_CONSUMER_KEY: ${{ secrets.OVH_CONSUMER_KEY }} | |
OVH_SERVICE_NAME: ${{ secrets.OVH_SERVICE_NAME }} | |
- name: Create instance | |
run: poetry run python main.py create | |
env: | |
OVH_ENDPOINT: ${{ vars.OVH_ENDPOINT }} | |
OVH_INSTANCE_FLAVOR_ID: ${{ steps.get_ovh_ids.outputs.OVH_INSTANCE_FLAVOR_ID }} | |
OVH_INSTANCE_IMAGE_ID: ${{ steps.get_ovh_ids.outputs.OVH_INSTANCE_IMAGE_ID }} | |
OVH_REGION: ${{ inputs.ovhInstanceRegion }} | |
USERS: ${{ vars.USERS }} | |
OVH_APPLICATION_KEY: ${{ secrets.OVH_APPLICATION_KEY }} | |
OVH_APPLICATION_SECRET: ${{ secrets.OVH_APPLICATION_SECRET }} | |
OVH_CONSUMER_KEY: ${{ secrets.OVH_CONSUMER_KEY }} | |
OVH_SSH_KEY_ID: ${{ secrets.OVH_SSH_KEY_ID }} | |
OVH_SERVICE_NAME: ${{ secrets.OVH_SERVICE_NAME }} | |
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }} | |
INSTANCE_NAME_SUFFIX: ${{ inputs.instanceNameSuffix }} | |
MODEL_NAME: ${{ inputs.modelName }} |