Skip to content

Commit

Permalink
again setup python instead of default for runner
Browse files Browse the repository at this point in the history
  • Loading branch information
egillax committed Nov 1, 2024
1 parent 116d72d commit 3a4a2f8
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/R_CDM_check_hades.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ jobs:
- uses: r-lib/actions/setup-tinytex@v2

- uses: r-lib/actions/setup-pandoc@v2

- uses: actions/setup-python@v5
with:
python-version=`3.11`

- name: Install system requirements
if: runner.os == 'Linux'
Expand All @@ -79,15 +83,7 @@ jobs:
library(reticulate)
virtualenv_create("r-reticulate", Sys.which("python"), packages=python_packages)
# Detect the OS and set pip options accordingly
if (Sys.info()["sysname"] == "Darwin") {
# macOS
pip_options <- NULL
} else {
# Other OS, assume Linux or Windows needing CPU torch
pip_options <- c("--index-url https://download.pytorch.org/whl/cpu")
}
virtualenv_install("r-reticulate", "torch", pip_options = pip_options)
virtualenv_install("r-reticulate", "torch", pip_options = c("--index-url https://download.pytorch.org/whl/cpu"))
path_to_python <- virtualenv_python("r-reticulate")
writeLines(sprintf("RETICULATE_PYTHON=%s", path_to_python),
Expand Down

0 comments on commit 3a4a2f8

Please sign in to comment.