Package and Release Conda Environment #3
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: Package and Release Conda Environment | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 # 使用最新的v3版本 | |
- name: Set up Python | |
uses: actions/setup-python@v4 # 使用v4版本 | |
with: | |
python-version: '3.10.8' | |
- name: Install Miniconda | |
uses: conda-incubator/setup-miniconda@v3 # 使用v3版本 | |
with: | |
miniforge-variant: Miniforge # 使用Miniforge代替Mambaforge | |
python-version: '3.10' | |
- name: Create and activate conda environment | |
run: | | |
conda create --name VisRAG python=3.10.8 -y | |
source activate VisRAG | |
conda install -c nvidia/label/cuda-11.8.0 cuda-toolkit -y | |
- name: Install pip dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install -e . | |
cd timm_modified | |
pip install -e . | |
cd .. | |
- name: Package the environment with conda-pack | |
run: | | |
pip install conda-pack | |
conda pack -n VisRAG -o VisRAG_env.tar.gz | |
- name: Upload environment to GitHub Release | |
uses: ncipollo/release-action@v1.11.7 # 使用已发布的最新版本 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref_name }} | |
name: VisRAG Environment for v${{ github.ref_name }} | |
files: VisRAG_env.tar.gz |