conda gpu

main
ifiguero 2025-03-19 17:55:44 -03:00
parent d23ba450de
commit 400f194dd9
1 changed files with 21 additions and 0 deletions

View File

@ -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 <environment_name>"
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