-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated
setup_modules
and add setup_gpu_modules
- Loading branch information
1 parent
9f48ca5
commit eab84a6
Showing
5 changed files
with
80 additions
and
4 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#' Install GPU Python Modules | ||
#' | ||
#' @description Installs GPU modules for the {transforEmotion} conda environment | ||
#' | ||
#' @details Installs modules for miniconda using \code{\link[reticulate]{conda_install}} | ||
#' | ||
#' @author Alexander P. Christensen <[email protected]> | ||
#' | ||
#' @export | ||
#' | ||
# Install GPU modules | ||
# Updated 03.02.2024 | ||
setup_gpu_modules <- function() | ||
{ | ||
|
||
# Set necessary modules | ||
modules <- c( | ||
"autoawq" | ||
) | ||
|
||
# Determine whether any modules need to be installed | ||
installed_modules <- reticulate::py_list_packages(envname = "transforEmotion") | ||
|
||
# Determine missing modules | ||
missing_modules <- modules[!modules %in% installed_modules$package] | ||
|
||
# Determine if modules need to be installed | ||
if(length(missing_modules) != 0){ | ||
|
||
# Send message to user | ||
message("\nInstalling modules for 'transforEmotion'...") | ||
|
||
# Install modules | ||
reticulate::conda_install( | ||
"transforEmotion", packages = missing_modules, pip = TRUE | ||
) | ||
|
||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,19 +6,19 @@ | |
#' | ||
#' @author Alexander P. Christensen <[email protected]> | ||
#' | ||
#' @noRd | ||
#' @export | ||
#' | ||
# Install modules | ||
# Updated 28.01.2024 | ||
# Updated 03.02.2024 | ||
setup_modules <- function() | ||
{ | ||
|
||
# Set necessary modules | ||
modules <- c( | ||
"accelerate", "autoawq", "llama-index", "nltk", | ||
"accelerate", "llama-index", "nltk", | ||
"opencv-python", "pandas", "pypdf", | ||
"pytube", "pytz", "qdrant-client", | ||
"sentencepiece", "tensorflow", "torch", | ||
"sentencepiece", "tensorflow", "torch", | ||
"torchaudio", "torchvision", "transformers" | ||
) | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.