From e3876005056f353b293dfb9e1df18885104d835c Mon Sep 17 00:00:00 2001 From: TheUnfocused <33618431+umutpo@users.noreply.github.com> Date: Sun, 4 Aug 2024 11:05:50 -0700 Subject: [PATCH] Added local runners and proper permissions --- install_required_mac.sh | 1 + install_required_ubuntu.sh | 6 ++++++ run_colab_mac.sh | 0 run_local_mac.sh | 7 +++++++ run_local_ubuntu.sh | 8 ++++++++ run_local_win.bat | 12 ++++++++++++ 6 files changed, 34 insertions(+) mode change 100644 => 100755 run_colab_mac.sh create mode 100644 run_local_mac.sh create mode 100755 run_local_ubuntu.sh create mode 100644 run_local_win.bat diff --git a/install_required_mac.sh b/install_required_mac.sh index 2bdb7597d..bafefc264 100755 --- a/install_required_mac.sh +++ b/install_required_mac.sh @@ -30,6 +30,7 @@ else brew install pyenv pyenv install 3.8 + python3 -m ensurepip --upgrade echo "Python3.8 has been installed." fi diff --git a/install_required_ubuntu.sh b/install_required_ubuntu.sh index 405a3d99c..4b360c417 100755 --- a/install_required_ubuntu.sh +++ b/install_required_ubuntu.sh @@ -20,6 +20,7 @@ else sudo apt-get update sudo apt-get install -y python3.8 + python3 -m ensurepip --upgrade echo "Python3.8 has been installed." fi @@ -50,5 +51,10 @@ else sudo apt-get update sudo apt-get -y install cuda-toolkit-12-6 + echo 'export CUDA_HOME=/usr/local/cuda' >> ~/.bashrc + echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64' >> ~/.bashrc + echo 'export PATH=$PATH:$CUDA_HOME/bin' >> ~/.bashrc + . ~/.bashrc + echo "CUDA installed." fi diff --git a/run_colab_mac.sh b/run_colab_mac.sh old mode 100644 new mode 100755 diff --git a/run_local_mac.sh b/run_local_mac.sh new file mode 100644 index 000000000..01416d129 --- /dev/null +++ b/run_local_mac.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +echo "Make sure you set up your branch name in colab_runner.ipynb" +if ! [ -d "./.venv" ]; then + python3 -m venv .venv +fi +source .venv/bin/activate && python3 -m pip install -r requirements.txt && python3 main.py --dont-print-server && deactivate \ No newline at end of file diff --git a/run_local_ubuntu.sh b/run_local_ubuntu.sh new file mode 100755 index 000000000..ceca5b350 --- /dev/null +++ b/run_local_ubuntu.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +echo "Make sure you set up your branch name in colab_runner.ipynb" + +if ! [ -d "./.venv"]; then + python3 -m venv .venv +fi +source .venv/bin/activate && python3 -m pip install -r requirements.txt && python3 main.py --dont-print-server && deactivate \ No newline at end of file diff --git a/run_local_win.bat b/run_local_win.bat new file mode 100644 index 000000000..706be0c3c --- /dev/null +++ b/run_local_win.bat @@ -0,0 +1,12 @@ +echo Make sure you set up your branch name in colab_runner.ipynb + +IF NOT EXIST ".venv" ( + python -m venv .venv +) +call .venv\Scripts\activate +python -m pip install -r requirements.txt +python main.py --dont-print-server +call .venv\Scripts\deactivate + +echo Script execution completed. +pause