Releases: cyberark/ByteCodeLLM
First Release
Guide to Compile Binaries for ByteCodeLLM
This guide provides step-by-step instructions to compile and run ByteCodeLLM binaries for Linux, Windows, and macOS platforms.
Prerequisites
-
Install Dependencies: Before proceeding, install all the dependencies required for the project.
-
Install PyInstaller: Ensure that PyInstaller is installed to compile the binaries:
pip install pyinstaller
-
Clone this repository:
git clone https://github.com/cyberark/ByteCodeLLM
- Follow the pycdc instructions to compile pycdc and pycdas.
Step 1: Create a .spec
File and place it in the same directory of the executable
I added down below a .spec file for example that you will need to change the path to you llama package explicit.
Before running PyInstaller, make the following changes to the .spec
file:
-
Windows: Add the path to the
llama.dll
file. The path must be explicit and correct. Example:binaries=[('C:\path\to\llama.dll', 'llama_cpp\lib')]
-
Linux: Add the full path to the
libllama.so
file. Example:binaries=[('/full/path/to/libllama.so', ''llama_cpp/lib'')]
-
macOS: Add the full path to the
libllama.dylib
file. Example:binaries=[('/full/path/to/libllama.dylib', 'llama_cpp/lib'.')]
Finally: This will create the binary in the dist
folder:
pyinstaller ByteCodeLLM.spec
Step 3: Configurations
After building the binary:
- Move or copy the
config.py
script into thedist
folder where the binary is located. - The config.py is also added here (Important change the path to the relative pycdc, pycdas executables).
Step 4: Running the Binary
Once the binary is compiled and the configuration file is in place, you can run the binary. Below is an example command for executing the binary:
Windows:
dist\ByteCodeLLM.exe --path path\to\file --output output_path --type type(pyc)
Linux:
./dist/ByteCodeLLM --path /path/to/file --output /output/path --type type(pyc)
macOS:
./dist/ByteCodeLLM --path /path/to/file --output /output/path --type type(pyc)
Replace path\to\file
and output_path
with your actual input file path and desired output directory.
By following this guide, you should be able to compile and run ByteCodeLLM binaries for Linux, Windows, and macOS systems successfully. If you encounter any issues, double-check the paths and ensure all dependencies are installed.