Last active
July 1, 2024 10:33
-
-
Save evmKnows/76c897c88d85ecb3e4c8e9f25455a6cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Exit immediately if a command exits with a non-zero status | |
| set -e | |
| # Install dependencies | |
| apt-get update && apt-get install -y --no-install-recommends \ | |
| curl wget \ | |
| ocl-icd-libopencl1 \ | |
| opencl-headers \ | |
| nano \ | |
| build-essential \ | |
| clinfo pkg-config | |
| # Set up OpenCL | |
| mkdir -p /etc/OpenCL/vendors && \ | |
| echo "libnvidia-opencl.so.1" | tee /etc/OpenCL/vendors/nvidia.icd > /dev/null | |
| ln -sf /usr/local/cuda/lib64/libOpenCL.so.1 /usr/lib/libOpenCL.so | |
| echo "/usr/local/nvidia/lib" | tee -a /etc/ld.so.conf.d/nvidia.conf > /dev/null | |
| echo "/usr/local/nvidia/lib64" | tee -a /etc/ld.so.conf.d/nvidia.conf > /dev/null | |
| export PATH=/usr/local/nvidia/bin:${PATH} | |
| export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:${LD_LIBRARY_PATH} | |
| export NVIDIA_VISIBLE_DEVICES=all | |
| export NVIDIA_DRIVER_CAPABILITIES=compute,utility | |
| # Build | |
| make all | |
| # Archive production artifacts | |
| tar -czvf release.tgz profanity2.x64 | |
| echo "Build completed. Artifact archived as release.tgz" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment