#!/bin/bash # Check if Git is installed if ! command -v git &> /dev/null; then echo "Git is not installed. Please install Git and try again." exit 1 fi # Check if Conda is installed if ! command -v conda &> /dev/null; then echo "Conda is not installed. Please install Conda and try again." exit 1 fi # Clone the repository if it doesn't exist REPO_URL="https://github.com/username/HealthyAiExpert.git" DIR_NAME="HealthyAiExpert" if [ ! -d "$DIR_NAME" ]; then git clone $REPO_URL $DIR_NAME echo "Cloned repository into $DIR_NAME" else echo "Directory $DIR_NAME already exists. Skipping clone." fi cd $DIR_NAME # Create .env file if it doesn't exist if [ ! -f ".env" ]; then touch .env echo "Created .env file. Please add the necessary variables." else echo ".env file already exists. Please ensure it has the correct variables." fi # Create .gitignore file echo "__pycache__/" > .gitignore echo "*.pyc" >> .gitignore echo ".env" >> .gitignore echo "Created .gitignore with default entries." # Create Conda environment if it doesn't exist ENV_NAME="myenv" PYTHON_VERSION="3.11" if ! conda env list | grep -q $ENV_NAME; then conda create --name $ENV_NAME python=$PYTHON_VERSION -y echo "Created Conda environment: $ENV_NAME" else echo "Conda environment $ENV_NAME already exists." fi # Activate the Conda environment eval "$(conda shell.bash hook)" conda activate $ENV_NAME # Install required packages pip install -r requirements.txt echo "Setup complete. To run the project, use: python app.py"