enose_2025/create_conda.sh

22 lines
785 B
Bash
Raw Permalink Normal View History

2025-03-09 04:22:15 -03:00
# 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
2025-03-17 00:32:19 -03:00
conda create -n "$env_name" python scikit-learn==1.3.1 xgboost conda-forge::tensorflow-cpu conda-forge::optuna keras pandas numpy matplotlib openpyxl xlsxwriter conda-forge::enlighten
2025-03-09 04:22:15 -03:00
if [ $? -eq 0 ]; then
echo "Packages installed successfully in environment '$env_name'"
else
echo "Aborted."
fi