Skip to content

Compile tips for Ubuntu (or any other Linux-like system)Β #39

@umiiii

Description

@umiiii

I spent a whole week on this project, so here are some tips for you to save the time:

apt-get update && apt-get install -y --no-install-recommends \
        curl wget \
        ocl-icd-libopencl1 \
        opencl-headers \
        nano \
        build-essential \
        clinfo pkg-config && \
    rm -rf /var/lib/apt/lists/*

mkdir -p /etc/OpenCL/vendors && \
    echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd

ln -s /usr/local/cuda/lib64/libOpenCL.so.1 /usr/lib/libOpenCL.so

echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
    echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf

export PATH=/usr/local/nvidia/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:${LD_LIBRARY_PATH}

# nvidia-container-runtime
export NVIDIA_VISIBLE_DEVICES=all
export NVIDIA_DRIVER_CAPABILITIES=compute,utility

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions