diff --git a/scripts/activate.sh b/scripts/activate.sh new file mode 100755 index 0000000..8e3fa01 --- /dev/null +++ b/scripts/activate.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Define the paths for the environments +ENV_1_PATH="envs/env" +ENV_2_PATH="envs/env_tensorflow" + +# Check if the environments exist +if [ ! -d "$ENV_1_PATH" ] || [ ! -d "$ENV_2_PATH" ]; then + echo "One or both environments do not exist in the 'envs/' directory." + exit 1 +fi + +# Activate the first environment (default) +echo "Activating environment '$ENV_1_PATH'..." +source "$ENV_1_PATH/bin/activate" + +# Export PYTHONPATH to include both environments' site-packages +export PYTHONPATH="$PWD/$ENV_1_PATH/lib/python3.12/site-packages:$PWD/$ENV_2_PATH/lib/python3.12/site-packages" + +echo "Environment set up successfully. PYTHONPATH set to include both environments." + +# Optionally, print the current PYTHONPATH to verify +echo "PYTHONPATH=${PYTHONPATH}" diff --git a/scripts/setup_env.sh b/scripts/setup_env.sh index 628b7ee..894b055 100755 --- a/scripts/setup_env.sh +++ b/scripts/setup_env.sh @@ -27,10 +27,6 @@ pip install -r requirements/env.txt deactivate source envs/env_tensorflow/bin/activate +echo "Installing dependencies in virtual environment env_tensorflow" pip install -r requirements/env_tensorflow.txt deactivate - -echo "Creating site-packages.pth" -touch site-packages.pth -echo "env/env/lib/python3.12/site-packages" >> site-packages.pth -echo "env/env_tensorflow/lib/python3.12/site-packages" >> site-packages.pth