Merge pull request #21 from joelmathewthomas/bugfix/scripts

Bugfix/scripts
This commit is contained in:
Joel Mathew Thomas
2025-01-26 18:28:28 +05:30
committed by GitHub
2 changed files with 24 additions and 5 deletions
+23
View File
@@ -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}"
+1 -5
View File
@@ -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