Skip to content

use env file

use env file #18

name: Daily Accuracy Benchmark
on:
workflow_dispatch:
schedule:
# Runs daily at 2:00 AM, Beijing time.
- cron: '0 18 * * *' # This is UTC time
jobs:
accuracy_benchmark:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create .env file
run: |
echo "OSS_AK_ID=${{ secrets.OSS_AK_ID }}" >> .env
echo "OSS_AK_SECRET=${{ secrets.OSS_AK_SECRET }}" >> .env
echo "OSS_ENDPOINT=${{ secrets.OSS_ENDPOINT }}" >> .env
echo "M6_TENANT=${{ secrets.M6_TENANT }}" >> .env
echo "MIT_SPIDER_TOKEN=${{ secrets.MIT_SPIDER_TOKEN }}" >> .env
echo "MIT_SPIDER_URL=${{ secrets.MIT_SPIDER_URL }}" >> .env

Check failure on line 25 in .github/workflows/accuracy_benchmark.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/accuracy_benchmark.yml

Invalid workflow file

You have an error in your yaml syntax on line 25
- name: Perform the accuracy benchmark
run: |
docker pull $UT_IMAGE
echo 'Running accuracy benchmark...'
docker run \
-v $PWD:$PWD \
-w $PWD \
--net host \
--ipc host \
--shm-size 80G \
-t --rm \
--gpus all \
--env-file .env \
$UT_IMAGE bash -c ' \
git config --global --add safe.directory $PWD && \
pip install -e . && \
cd benchmarks/accuracy && NPROC_PER_NODE=4 bash ./run.sh'
- name: Clean up .env
run: rm -f .env
env:
UT_IMAGE: ${{ secrets.UT_IMAGE }}