Opus-MT icon indicating copy to clipboard operation
Opus-MT copied to clipboard

Docker compile for GPU fails due to missing CUDA installation

Open akangasr opened this issue 4 years ago • 4 comments

When compiling the docker image after changing the Dockerfile cmake line from cpu to gpu usage, as instructed by the comment in Dockerfile, the following error is raised during docker build:

CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "9.0")

Cannot find suitable CUDA libraries. Specify the path explicitly with
  -DCUDA_TOOLKIT_ROOT_DIR=/path/to/appropriate/cuda/installation
   (hint: try /usr/local/$(readlink /usr/local/cuda))
OR compile the CPU-only version of Marian with
  -DCOMPILE_CUDA=off

CMake Error at CMakeLists.txt:289 (message):
  FATAL ERROR: No suitable CUDA library found.

akangasr avatar Jun 18 '20 14:06 akangasr

Wtih MarianNMT 1.9, I need to test the docker file again. For now, in pull #22, I removed the GPU related lines. If you have access to a GPU machine, can you help to create Dockerfile.gpu based on the CPU one and https://marian-nmt.github.io/docs/ ?

santhoshtr avatar Jun 19 '20 11:06 santhoshtr

We may need to use a base image from https://hub.docker.com/r/nvidia/cuda

santhoshtr avatar Jun 19 '20 11:06 santhoshtr

Is there any fix yet? Docker build nor docker-compose are working for me.

xirect avatar Sep 02 '20 20:09 xirect

@santhoshtr @jorgtied I've created a GPU version of the Dockerfile and submitted a PR.

martin-kirilov avatar Aug 26 '22 12:08 martin-kirilov