MCPcopy Create free account
hub / github.com/AnswerDotAI/gpu.cpp / setup_env

Function setup_env

setup.py:86–104  ·  view source on GitHub ↗
(os_name)

Source from the content-addressed store, hash-verified

84 download_file(url, outfile)
85
86def setup_env(os_name):
87 print("\nEnvironment Setup")
88 print("=================\n")
89
90 current_dir = os.getcwd()
91 lib_dir = os.path.join(current_dir, "third_party", "lib")
92
93 if os_name == "macOS":
94 print(" Before running the program, run the following command or add it to your shell profile:")
95 print(f" export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:{lib_dir}")
96
97 with open("source", "w") as f:
98 f.write(f"export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:{lib_dir}\n")
99 if os_name == "Linux":
100 print(" Before running the program, run the following command or add it to your shell profile:")
101 print(f" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{lib_dir}")
102
103 with open("source", "w") as f:
104 f.write(f"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{lib_dir}\n")
105
106def main():
107 os_name = get_os_name()

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected