disable OOM killing of the container itself #171
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: Test Tutorial | |
# following example: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ | |
on: | |
push: | |
branches: | |
- main | |
- test_tutorial | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+" | |
schedule: | |
# Weekly on saturday 23:59 | |
- cron: "59 23 * * 6" | |
jobs: | |
test-tutorial: | |
runs-on: [self-hosted, linux, x64, gpu] | |
container: | |
image: continuumio/miniconda3 | |
options: --runtime=nvidia --gpus all --memory=60G --oom-kill-disable | |
defaults: | |
run: | |
working-directory: ./docs/tutorials | |
steps: | |
- name: Pull code | |
uses: actions/checkout@v4 | |
- name: Install dependencies, code, and list everything | |
working-directory: ./ | |
run: | | |
conda install -y -c conda-forge python=3 cupy cuda-version=11.8 curl unzip | |
python -m pip install coverage mdextractor #mdextractor is new and might need to be replaced later | |
python -m pip install .[all] | |
conda list | |
- name: Grab files needed for tests | |
run: | | |
mkdir dataset | |
mkdir templates | |
mkdir results_80S | |
mkdir results_60S | |
cd templates | |
cp ../data/6qzp_60S.mrc . | |
curl https://files.wwpdb.org/pub/emdb/structures/EMD-2938/map/emd_2938.map.gz -o emd_2938.map.gz | |
gunzip emd_2938.map.gz | |
cd ../dataset | |
curl -L -O -J -H "X-Dataverse-key:${{ secrets.DATAVERSE_API_TOKEN }}" https://dataverse.nl/api/access/datafiles/384731,384724,384706,384718 | |
unzip dataverse_files.zip | |
# this inflates into a 'tutorial' folder, moving everything out | |
mv tutorial/* . | |
- name: Set TQDM_MININTERVAL | |
run: echo "TQDM_MININTERVAL=10" >> "$GITHUB_ENV" | |
- name: see ENV and nvidia-smi | |
run: | | |
env | |
nvidia-smi | |
- name: Run Tutorial test | |
run: | | |
# Hardcode the conversion line | |
for x in dataset/*.mrc; do python -c "import mrcfile; mrc = mrcfile.mmap('$x', 'r+'); mrc.voxel_size = 13.79"; done | |
pytom_create_template.py -i templates/emd_2938.map -o templates/80S.mrc --input-voxel 1.1 --output-voxel 13.79 --center --invert -b 60 | |
# python -u tests/test_tutorial.py |