Skip to content

Commit 2068ff5

Browse files
committed
Fix executable directory and added safe-guard if LLAMA_ROOT is loaded to avoid loading environments
1 parent 2b622d1 commit 2068ff5

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

llama-tornado

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ class LlamaRunner:
268268

269269

270270
def load_env_from_script():
271+
if "LLAMA_ROOT" in os.environ and os.environ["LLAMA_ROOT"]:
272+
return
273+
271274
system = platform.system()
272275

273276
if system == "Windows":

set_paths

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export TORNADO_ROOT="${LLAMA_ROOT}/external/tornadovm"
1212
export TORNADO_SDK="${TORNADO_ROOT}/bin/sdk"
1313

1414
# Add TornadoVM and LLaMA bin directories to PATH
15-
export PATH="${PATH}:${TORNADO_SDK}:${LLAMA_ROOT}/bin"
15+
export PATH="${PATH}:${TORNADO_SDK}:${LLAMA_ROOT}"
1616

1717
# Optional: Set JAVA_HOME if required
1818
# export JAVA_HOME=/path/to/graalvm

set_paths.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ set "TORNADO_ROOT=%LLAMA_ROOT%\external\tornadovm"
1212
set "TORNADO_SDK=%TORNADO_ROOT%\bin\sdk"
1313

1414
REM Add TornadoVM SDK and LLaMA3 bin to PATH
15-
set "PATH=%TORNADO_SDK%;%LLAMA_ROOT%\bin;%PATH%"
15+
set "PATH=%TORNADO_SDK%;%LLAMA_ROOT%;%PATH%"
1616

1717
REM Optional: Set JAVA_HOME if needed
1818
REM set "JAVA_HOME=C:\Path\To\GraalVM"

0 commit comments

Comments
 (0)