Commit 4333d0ef authored by zhuwenwen's avatar zhuwenwen
Browse files

add git config

parent caf953b6
......@@ -20,6 +20,7 @@ from typing import Optional, Union
import subprocess
from pathlib import Path
pwd = os.path.dirname(os.path.abspath(__file__))
add_git_version = False
if int(os.environ.get('ADD_GIT_VERSION', '0')) == 1:
add_git_version = True
......@@ -475,6 +476,8 @@ def get_sha(root: Union[str, Path]) -> str:
def get_version_add(sha: Optional[str] = None) -> str:
command = "git config --global --add safe.directory "+pwd
result = subprocess.run(command, shell=True, capture_output=False, text=True)
vllm_root = os.path.dirname(os.path.abspath(__file__))
add_version_path = os.path.join(os.path.join(vllm_root, "vllm"), "version.py")
major, minor, _ = torch.__version__.split('.')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment