From 7bfe205fcf6b4d0a7c2001a62aba58caa10498e1 Mon Sep 17 00:00:00 2001 From: NitishTRI3D <120464367+NitishTRI3D@users.noreply.github.com> Date: Tue, 31 Oct 2023 22:24:59 +0530 Subject: [PATCH] Create azurestartscript.sh --- azurestartscript.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 azurestartscript.sh diff --git a/azurestartscript.sh b/azurestartscript.sh new file mode 100644 index 0000000..941a1bb --- /dev/null +++ b/azurestartscript.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Navigate to the project directory +cd /home/ubuntu/GITHUB/comfyanonymous/ComfyUI +# Activate the Anaconda environment +. /opt/anaconda/bin/activate +conda activate comfy + +# Start a new tmux session or connect to an existing one +if ! tmux has-session -t run 2>/dev/null; then + tmux new-session -d -s run + tmux send-keys -t run 'python main.py --port 3000' C-m +fi + +# Attach to the tmux session +tmux attach-session -t run +