Better path fix
This commit is contained in:
6
scripts/add_venvs_to_path.sh
Normal file
6
scripts/add_venvs_to_path.sh
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
for venv in /root/venvs/*/bin
|
||||||
|
do
|
||||||
|
export PATH=$PATH:$venv
|
||||||
|
done
|
||||||
@@ -58,8 +58,18 @@ ln -s "/root/sia/web/dist" "/root/static"
|
|||||||
# Install SIA dependencies
|
# Install SIA dependencies
|
||||||
source "/root/sia/scripts/install.sh"
|
source "/root/sia/scripts/install.sh"
|
||||||
|
|
||||||
# Fix runpod environment so it doesn't reset PATH
|
# Add venvs to path in .bashrc
|
||||||
sed -i '/^export PATH/d' /etc/rp_environment
|
if ! grep -q "source /root/sia/scripts/add_venvs_to_path.sh" /root/.bashrc; then
|
||||||
|
echo 'source /root/sia/scripts/add_venvs_to_path.sh' >> /root/.bashrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add venvs to path in profile
|
||||||
|
if ! grep -q "source /root/sia/scripts/add_venvs_to_path.sh" /etc/profile; then
|
||||||
|
echo 'source /root/sia/scripts/add_venvs_to_path.sh' >> /etc/profile
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add venvs to path in current shell
|
||||||
|
source /root/sia/scripts/add_venvs_to_path.sh
|
||||||
|
|
||||||
## Finetune model
|
## Finetune model
|
||||||
#echo "Finetuning model..."
|
#echo "Finetuning model..."
|
||||||
|
|||||||
@@ -4,19 +4,13 @@ echo "Installing ITB tool..."
|
|||||||
python3 -m venv /root/venvs/itb
|
python3 -m venv /root/venvs/itb
|
||||||
/root/venvs/itb/bin/pip install -e /root/sia/tools/itb
|
/root/venvs/itb/bin/pip install -e /root/sia/tools/itb
|
||||||
/root/venvs/train/bin/ipython kernel install --name=itb
|
/root/venvs/train/bin/ipython kernel install --name=itb
|
||||||
echo "PATH=\$PATH:/root/venvs/itb/bin" > /etc/profile.d/itb.sh
|
|
||||||
source /etc/profile.d/itb.sh
|
|
||||||
|
|
||||||
echo "Installing Train tool..."
|
echo "Installing Train tool..."
|
||||||
python3 -m venv /root/venvs/train
|
python3 -m venv /root/venvs/train
|
||||||
/root/venvs/train/bin/pip install -e /root/sia/tools/train
|
/root/venvs/train/bin/pip install -e /root/sia/tools/train
|
||||||
/root/venvs/train/bin/ipython kernel install --name=train
|
/root/venvs/train/bin/ipython kernel install --name=train
|
||||||
echo "PATH=\$PATH:/root/venvs/train/bin" > /etc/profile.d/train.sh
|
|
||||||
source /etc/profile.d/train.sh
|
|
||||||
|
|
||||||
echo "Installing SIA core..."
|
echo "Installing SIA core..."
|
||||||
python3 -m venv /root/venvs/sia
|
python3 -m venv /root/venvs/sia
|
||||||
/root/venvs/sia/bin/pip install -e /root/sia
|
/root/venvs/sia/bin/pip install -e /root/sia
|
||||||
/root/venvs/train/bin/ipython kernel install --name=sia
|
/root/venvs/train/bin/ipython kernel install --name=sia
|
||||||
echo "PATH=\$PATH:/root/venvs/sia/bin" > /etc/profile.d/sia.sh
|
|
||||||
source /etc/profile.d/sia.sh
|
|
||||||
Reference in New Issue
Block a user