Helsinki-NLP / Opus-MT

Open neural machine translation models and web services
MIT License
592 stars 71 forks source link

Docker compile for GPU fails due to missing CUDA installation #21

Open akangasr opened 4 years ago

akangasr commented 4 years ago

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.
santhoshtr commented 4 years ago

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 commented 4 years ago

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

xirect commented 4 years ago

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

martin-kirilov commented 2 years ago

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