From 513a36e469861cf0902e00c79909720b92184920 Mon Sep 17 00:00:00 2001 From: ersilia-bot Date: Tue, 19 Mar 2024 08:29:14 +0000 Subject: [PATCH] updating readme [skip ci] --- .github/workflows/run-inference-instance.yml | 104 ------------------ .github/workflows/run-inference-pipeline.yml | 24 ---- .../workflows/upload-model-to-dockerhub.yml | 26 ++++- 3 files changed, 21 insertions(+), 133 deletions(-) delete mode 100644 .github/workflows/run-inference-instance.yml delete mode 100644 .github/workflows/run-inference-pipeline.yml diff --git a/.github/workflows/run-inference-instance.yml b/.github/workflows/run-inference-instance.yml deleted file mode 100644 index 3c924ee..0000000 --- a/.github/workflows/run-inference-instance.yml +++ /dev/null @@ -1,104 +0,0 @@ -name: Perform Inference Instance - -on: - workflow_call: - inputs: - numerator: - required: true - type: number - denominator: - required: true - type: number - -env: - MODEL_ID: ${{ github.event.repository.name }} - SHA: ${{ github.sha }} - -jobs: - infer-and-upload: - runs-on: ubuntu-latest - steps: - - name: Print system details - run: sudo lshw -short - - - name: Check into ersilia-os/ersilia repo - uses: actions/checkout@v3 - with: - repository: ersilia-os/ersilia - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@master - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: eu-central-1 - - - name: Get input library - run: | - aws s3 cp s3://isaura-bucket/reference_library.csv reference_library.csv - - - name: Split library by partition variables - run: | - numerator=${{ inputs.numerator }} - denominator=${{ inputs.denominator }} - filename="reference_library.csv" - - ## Total # lines in given reference library - total_lines=$(wc -l < "$filename") - echo $total_lines - - # Determine the # of file lines per partition - ((lines_per_file = (total_lines + $denominator-1) / $denominator)) - - # Split the file - split -l $lines_per_file -a 4 -d --additional-suffix=.csv "$filename" partition_ - - # Add 'smiles' to header of all partition files beyond the first - for (( i=1; i<$denominator; i++ )) - do - partition=$(printf "partition_%04d.csv" $i) - sed -i '1i smiles' "$partition" - done - - # List files in dir - ls - - - name: Add conda to system path - run: echo $CONDA/bin >> $GITHUB_PATH - - - name: Source conda - run: source $CONDA/etc/profile.d/conda.sh - - - name: Set Python to 3.10.10 - run: - conda install -y python=3.10.10 - - - name: Install dependencies - run: | - source activate - conda init - conda install git-lfs -c conda-forge - git-lfs install - conda install gh -c conda-forge - - - name: Install ersilia - run: | - source activate - python --version - echo "After conda init" - conda init - python -m pip install -e .[test] - - - name: Predict partition output and upload - run: | - numerator=${{ inputs.numerator }} - index=$((numerator - 1)) - - source activate - echo "Sample model id selected: $MODEL_ID" - ersilia fetch $MODEL_ID - ersilia serve $MODEL_ID - echo "$MODEL_ID succesfully fetched and served" - ersilia api -i $(printf "partition_%04d.csv" $index) -o ../${SHA}$(printf "_%04d.csv" $numerator) - - aws s3 cp ../${SHA}$(printf "_%04d.csv" $numerator) s3://isaura-bucket/out/$MODEL_ID/${SHA}$(printf "_%04d.csv" $numerator) diff --git a/.github/workflows/run-inference-pipeline.yml b/.github/workflows/run-inference-pipeline.yml deleted file mode 100644 index a44962d..0000000 --- a/.github/workflows/run-inference-pipeline.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Run Inference Pipeline -on: - workflow_dispatch: - -permissions: - contents: read - -jobs: - matrix-inference: - if: github.repository != 'ersilia-os/eos-template' - strategy: - matrix: - numerator: [ - 1,2,3,4,5,6,7,8,9,10, - 11,12,13,14,15,16,17,18,19,20, - 21,22,23,24,25,26,27,28,29,30, - 31,32,33,34,35,36,37,38,39,40, - 41,42,43,44,45,46,47,48,49,50 - ] - uses: ./.github/workflows/run-inference-instance.yml - with: - numerator: ${{ matrix.numerator }} - denominator: 50 - secrets: inherit diff --git a/.github/workflows/upload-model-to-dockerhub.yml b/.github/workflows/upload-model-to-dockerhub.yml index 5cfe0af..69275df 100644 --- a/.github/workflows/upload-model-to-dockerhub.yml +++ b/.github/workflows/upload-model-to-dockerhub.yml @@ -14,12 +14,12 @@ jobs: steps: # https://github.com/docker/setup-qemu-action - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 # https://github.com/docker/setup-buildx-action - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 # log in to dockerhub - name: Login to Docker Hub @@ -35,7 +35,22 @@ jobs: persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token fetch-depth: 0 # otherwise, you will failed to push refs to dest repo lfs: 'true' + + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + # this might remove tools that are actually needed, + # if set to "true" but frees about 6 GB + tool-cache: true + # all of these default to true, but feel free to set to + # "false" if necessary for your workflow + android: true + dotnet: true + haskell: true + large-packages: true + swap-storage: true + - name: Generate the Dockerfile id: generate-dockerfile env: @@ -44,11 +59,12 @@ jobs: wget https://raw.githubusercontent.com/ersilia-os/ersilia/master/.github/scripts/place_a_dockerfile_in_current_eos_repo.py python -m pip install requests python place_a_dockerfile_in_current_eos_repo.py $REPO_NAME - + - name: Build and push id: buildMultiple continue-on-error: true - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 + timeout-minutes: 45 with: context: . platforms: linux/amd64,linux/arm64 @@ -69,7 +85,7 @@ jobs: - name: Build only for Linux/amd64 id: buildSingle if: steps.buildCheck.outputs.failed == 'true' - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: . platforms: linux/amd64