OpenNMT / OpenNMT/CTranslate2

Docker: exec format error on linux/arm64/v8

Open
#1,155 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
4.7k
Forks
536
Avg merge
12h 12m
Merged PRs (30d)
4

Description

Software/hardware setup:

  • Nvidia container toolkit version 1.11.0-rc1
  • Docker version 20.10.12, build 20.10.12-0ubuntu2~20.04.1
  • Ubuntu 20.04.5 LTS
  • ARMv8 Processor rev1

I'm trying to run CTranslate2 using the docker images provided from GitHub, but I'm running into a few issues. I used the docker commands from the documentation but I'm some errors because I'm trying to run on a linux/arm64/v8 platform.

$ docker pull ghcr.io/opennmt/ctranslate2:latest-ubuntu20.04-cuda11.2
latest-ubuntu20.04-cuda11.2: Pulling from opennmt/ctranslate2
Digest: sha256:b206f9215f46260a43e4b0cc1e675ce4ed668bab4263eeae862f92aef795beb2
Status: Image is up to date for ghcr.io/opennmt/ctranslate2:latest-ubuntu20.04-cuda11.2
ghcr.io/opennmt/ctranslate2:latest-ubuntu20.04-cuda11.2

$ docker run --rm ghcr.io/opennmt/ctranslate2:latest-ubuntu20.04-cuda11.2 --help
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /opt/ctranslate2/bin/ct2-translator: exec format error

I also tried running with --platform linux/arm64/v8 but I got this error.

$ docker run --rm --platform linux/arm64/v8 ghcr.io/opennmt/ctranslate2:latest-ubuntu20.04-cuda11.2 --help
Unable to find image 'ghcr.io/opennmt/ctranslate2:latest-ubuntu20.04-cuda11.2' locally
latest-ubuntu20.04-cuda11.2: Pulling from opennmt/ctranslate2
Digest: sha256:b206f9215f46260a43e4b0cc1e675ce4ed668bab4263eeae862f92aef795beb2
Status: Image is up to date for ghcr.io/opennmt/ctranslate2:latest-ubuntu20.04-cuda11.2
docker: Error response from daemon: image with reference ghcr.io/opennmt/ctranslate2:latest-ubuntu20.04-cuda11.2 was found but does not match the specified platform: wanted linux/arm64/v8, actual: linux/amd64.
See 'docker run --help'.

I tried building using the Dockerfile in CTranslate2/docker but I'm getting a strange error when it's trying to download an intel library:

$ docker build -f docker/Dockerfile .
Sending build context to Docker daemon   6.27MB
Step 1/33 : FROM nvidia/cuda:11.2.2-cudnn8-devel-ubuntu20.04 as builder
 ---> 9915a4bd436c
Step 2/33 : RUN apt-get update &&     apt-get install -y --no-install-recommends         python3-dev         python3-pip         wget         &&     apt-get clean &&     rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 3ea5d64051a4
Step 3/33 : WORKDIR /root
 ---> Using cache
 ---> b2b53ebce051
Step 4/33 : ENV ONEAPI_VERSION=2023.0.0
 ---> Using cache
 ---> 8deb4922854f
Step 5/33 : ENV MKL_BUILD=25398
 ---> Using cache
 ---> c1690c6fac15
Step 6/33 : RUN wget -q https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB &&     apt-key add *.PUB &&     rm *.PUB &&     echo "deb https://apt.repos.intel.com/oneapi all main" > /etc/apt/sources.list.d/oneAPI.list &&     apt-get update &&     apt-get install -y --no-install-recommends         intel-oneapi-mkl-devel=$ONEAPI_VERSION-$MKL_BUILD         &&     apt-get clean &&     rm -rf /var/lib/apt/lists/*
 ---> Running in e9a37bfd77a0
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK
Get:1 https://apt.repos.intel.com/oneapi all InRelease [10.2 kB]
Get:2 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/sbsa  InRelease [1579 B]
Get:3 http://ports.ubuntu.com/ubuntu-ports focal InRelease [265 kB]
Get:4 https://apt.repos.intel.com/oneapi all/main all Packages [575 kB]
Err:4 https://apt.repos.intel.com/oneapi all/main all Packages
  File has unexpected size (82301 != 575480). Mirror sync in progress? [IP: 104.81.172.130 443]
  Hashes of expected file:
   - Filesize:575480 [weak]
   - SHA512:0bd6679d44666fad76d116c1ed09006c477af56da1b9f436cb28fcef1c9400b61ce8626dfc5663b72b7d986707b0a59d90799b067828c915cd0df7aca551a0fb
   - SHA256:e91a7554a31b2455a1bdb46b7ac297d4d087bf0260076167bde01bb60cf0e930
   - SHA1:41c618a2f9818185eaa4c7d05de78dec14fc0d94 [weak]
   - MD5Sum:d3c7b01eec8cbe3abe880c359263bf05 [weak]
  Release file created at: Mon, 27 Mar 2023 16:38:50 +0000
Get:5 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/sbsa  Packages [553 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [108 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [114 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages [1234 kB]
Get:10 http://ports.ubuntu.com/ubuntu-ports focal/multiverse arm64 Packages [139 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports focal/restricted arm64 Packages [1317 B]
Get:12 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 Packages [11.1 MB]
Get:13 http://ports.ubuntu.com/ubuntu-ports focal-updates/restricted arm64 Packages [5234 B]
Get:14 http://ports.ubuntu.com/ubuntu-ports focal-updates/multiverse arm64 Packages [9068 B]
Get:15 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 Packages [2236 kB]
Get:16 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 Packages [1227 kB]
Get:17 http://ports.ubuntu.com/ubuntu-ports focal-backports/universe arm64 Packages [27.8 kB]
Get:18 http://ports.ubuntu.com/ubuntu-ports focal-backports/main arm64 Packages [54.8 kB]
Get:19 http://ports.ubuntu.com/ubuntu-ports focal-security/restricted arm64 Packages [4999 B]
Get:20 http://ports.ubuntu.com/ubuntu-ports focal-security/universe arm64 Packages [929 kB]
Get:21 http://ports.ubuntu.com/ubuntu-ports focal-security/multiverse arm64 Packages [3252 B]
Get:22 http://ports.ubuntu.com/ubuntu-ports focal-security/main arm64 Packages [1848 kB]
Fetched 20.0 MB in 3s (7338 kB/s)
Reading package lists...
E: Failed to fetch https://apt.repos.intel.com/oneapi/dists/all/main/binary-all/Packages.gz  File has unexpected size (82301 != 575480). Mirror sync in progress? [IP: 104.81.172.130 443]
   Hashes of expected file:
    - Filesize:575480 [weak]
    - SHA512:0bd6679d44666fad76d116c1ed09006c477af56da1b9f436cb28fcef1c9400b61ce8626dfc5663b72b7d986707b0a59d90799b067828c915cd0df7aca551a0fb
    - SHA256:e91a7554a31b2455a1bdb46b7ac297d4d087bf0260076167bde01bb60cf0e930
    - SHA1:41c618a2f9818185eaa4c7d05de78dec14fc0d94 [weak]
    - MD5Sum:d3c7b01eec8cbe3abe880c359263bf05 [weak]
   Release file created at: Mon, 27 Mar 2023 16:38:50 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c wget -q https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB &&     apt-key add *.PUB &&     rm *.PUB &&     echo "deb https://apt.repos.intel.com/oneapi all main" > /etc/apt/sources.list.d/oneAPI.list &&     apt-get update &&     apt-get install -y --no-install-recommends         intel-oneapi-mkl-devel=$ONEAPI_VERSION-$MKL_BUILD         &&     apt-get clean &&     rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

Any help is greatly appreciated.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with docker/Dockerfile and the Docker installation documentation linked in the issue. Reproduce the image-platform mismatch on linux/arm64/v8 and inspect the Intel MKL package step; done means establishing and documenting a verified ARM64 build or runtime path, including the relevant limitation if support is not possible.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, linux, ubuntu
Domain
build-system, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.