Skip to content

Commit

Permalink
more install tweaks
Browse files Browse the repository at this point in the history
`pip_build.py` spawns processes that need the correct `python` on the PATH
  • Loading branch information
t-kalinowski committed Oct 19, 2023
1 parent 3162270 commit afb3035
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions R/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,18 @@ install_keras <- function(...,
withr::defer(unlink(keras_team_keras_dir, recursive = TRUE))
}
withr::local_dir(keras_team_keras_dir)
withr::local_path(dirname(python))
# browser()
system2 <- reticulate:::system2t
system2("git", "pull")
system2(python, c("-m pip install -r requirements.txt")) # unpin tf-nightly for Python 3.12
system2("python", c("-m pip install -r requirements.txt")) # unpin tf-nightly for Python 3.12

# system2(python, c("-m pip install ipython")) # for interactive debugging
# system2(python, c("-m pip install -r requirements-common.txt"))
# system2(python, c("-m pip install torch torchvision")) # needed for pip_build.py?? (but why?)
# system2(python, c("-m pip install tf-nightly jax[cpu]")) # unpin tf-nightly for Python 3.12
# system2("python", c("-m pip install ipython")) # for interactive debugging
# system2("python", c("-m pip install -r requirements-common.txt"))
# system2("python", c("-m pip install torch torchvision")) # needed for pip_build.py?? (but why?)
# system2("python", c("-m pip install tf-nightly jax[cpu]")) # unpin tf-nightly for Python 3.12

system2(python, c("pip_build.py --install"))
system2("python", c("pip_build.py --install"))
message("Done!")

return(invisible())
Expand Down

0 comments on commit afb3035

Please sign in to comment.