Skip to content

Commit

Permalink
Update r_ubuntu.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
davidycliao committed Dec 28, 2024
1 parent b2d4109 commit 363628b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/r_ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,25 @@ jobs:
})
shell: Rscript {0}

# 優化 Python 虛擬環境設置
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10.x'
cache: 'pip'

- name: Setup pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Create and configure venv
run: |
python -m venv flair_env
source flair_env/bin/activate
mkdir -p ~/.cache/pip
pip install --upgrade pip
# 分步安裝以減少內存使用
pip install --no-cache-dir scipy==1.12.0
pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
Expand Down

0 comments on commit 363628b

Please sign in to comment.