From 400f194dd9cc86786650bfd0ef3a2769e2cc03ed Mon Sep 17 00:00:00 2001 From: Israel Figueroa Date: Wed, 19 Mar 2025 17:55:44 -0300 Subject: [PATCH] conda gpu --- create_conda_gpu.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 create_conda_gpu.sh diff --git a/create_conda_gpu.sh b/create_conda_gpu.sh new file mode 100644 index 0000000..6989568 --- /dev/null +++ b/create_conda_gpu.sh @@ -0,0 +1,21 @@ +# prompt: create a bash script that check if a single argument was given and install this conda packages: python scikit-learn keras pandas numpy matplotlib tensorflow openpyxl enlighten +# if the user dont input any argument or more than 1 print a help to use the script + +#!/bin/bash + +if [ $# -ne 1 ]; then + echo "Usage: $0 " + echo "" + echo " Installs conda packages for a specified environment." + echo " Example: $0 enose1" + exit 1 +fi + +env_name=$1 + +conda create -n "$env_name" python scikit-learn==1.3.1 conda-forge::py-xgboost-gpu conda-forge::tensorflow-gpu conda-forge::optuna anaconda::keras-gpu pandas numpy matplotlib openpyxl xlsxwriter conda-forge::enlighten +if [ $? -eq 0 ]; then + echo "Packages installed successfully in environment '$env_name'" +else + echo "Aborted." +fi