You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the C2ME mod there' s a beta that enables GPU support with OpenCL. It can be found on their Discord server. You can't run the mod without OpenCL installed or it will crash.
This mod vastly improves chunk generation and therefore the experience of Minecraft. I would consider adding OpenCL to the Docker container once C2ME's GPU support gets officially released on Modrinth.
I've successfully implemented OpenCL support for the C2ME mod using a custom image. Total image size increase is only ~2MB (851MB → 853MB) because it uses the generic ICD loader rather than bundling heavy driver packages.
For anyone looking to implement this, here is the working configuration:
1. Dockerfile
The key is installing the generic OpenCL loader and manually pointing it to the NVIDIA library that the Docker runtime injects.
FROM itzg/minecraft-server:java25
# Install the generic OpenCL loader (very lightweight)RUN apt-get update && \
apt-get install -y --no-install-recommends ocl-icd-libopencl1 && \
rm -rf /var/lib/apt/lists/*
# Create the vendor hook so the loader finds the NVIDIA driver injected by the hostRUN mkdir -p /etc/OpenCL/vendors && \
echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
2. Docker Compose requirements
To "link" the hardware to the container, the following environment variables and reservations are required:
Activity
itzg commentedon Dec 26, 2025
My only concern would be the increase in image size. Will just need to try it and measure with
docker historybefore and after.FYI, this was added as a means for custom images to be built
https://docker-minecraft-server.readthedocs.io/en/latest/misc/building/#installing-extra-packages
mattcam98 commentedon Feb 23, 2026
I've successfully implemented OpenCL support for the C2ME mod using a custom image. Total image size increase is only ~2MB (851MB → 853MB) because it uses the generic ICD loader rather than bundling heavy driver packages.
For anyone looking to implement this, here is the working configuration:
1. Dockerfile
The key is installing the generic OpenCL loader and manually pointing it to the NVIDIA library that the Docker runtime injects.
2. Docker Compose requirements
To "link" the hardware to the container, the following environment variables and reservations are required:
This setup resolves the
OpenCL error [-1001](CL_PLATFORM_NOT_FOUND_KHR) by ensuring the Java/LWJGL layer has a valid ICD path to the host GPU.