feat: add nvidia-smi for flash attn and save img #12
This file contains hidden or 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: Deploy to Hugging Face Spaces | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: "latest" | |
| - name: Deploy via HF Job | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| run: | | |
| # Create secrets file for HF job | |
| echo "HF_TOKEN=$HF_TOKEN" > .sec | |
| # Run uvnote build on GPU-enabled HF job and deploy | |
| uvx --from huggingface-hub \ | |
| hf jobs run \ | |
| --secrets-file .sec \ | |
| --flavor a10g-largex4 \ | |
| ghcr.io/astral-sh/uv:debian \ | |
| /bin/bash -c \ | |
| "uv python install 3.11 && export UV_PYTHON=3.11 && git clone https://github.com/${{ github.repository }}.git repo && cd repo && uvx https://github.com/drbh/uvnote.git build . && uvx --from huggingface-hub hf upload --token \$HF_TOKEN --delete --exclude \"*.json\" --exclude \"*.pt\" --repo-type space drbh/uvnote-book-explore site/ /" |