[ELECTRA / TF2] docker build error: returned a non-zero code 1
Related to ELECTRA / TF2
Describe the bug
Hi, I tried to this.
At the step 2: bash scripts/docker/build.sh, I encounter the below error
$ bash scripts/docker/build.sh
Sending build context to Docker daemon 1.129MB
Step 1/27 : ARG FROM_IMAGE_NAME=nvcr.io/nvidia/tensorflow:20.07-tf2-py3
Step 2/27 : FROM ${FROM_IMAGE_NAME} AS tokenizers_amd64
---> eb9f8c3d29b5
Step 3/27 : WORKDIR /wheelhouse
---> Using cache
---> 52899ff67725
Step 4/27 : RUN pip download tokenizers==0.7.0
---> Using cache
---> 7390e7bf538e
Step 5/27 : FROM quay.io/pypa/manylinux2014_aarch64 as tokenizers_arm64
---> 4da096c082d2
Step 6/27 : ARG PYVER=38
---> Using cache
---> abeec716d7e9
Step 7/27 : RUN yum install -y openssl-devel
---> [Warning] The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested
---> Running in 96afef5e19a7
exec /bin/sh: exec format error
The command '/bin/sh -c yum install -y openssl-devel' returned a non-zero code: 1
reference: Dockerfile
To Reproduce Steps to reproduce the behavior:
- Clone the repository.
git clone https://github.com/NVIDIA/DeepLearningExamples.git
cd DeepLearningExamples/TensorFlow2/LanguageModeling/ELECTRA
- Build ELECTRA on top of the NGC container.
bash scripts/docker/build.sh
Expected behavior build docker images
Environment Please provide at least:
- Container version (e.g. pytorch:19.05-py3): Dockerfile
- GPUs in the system: (e.g. 8x Tesla V100-SXM2-16GB): 4x NVIDIA RTX A6000-48GB
- CUDA driver version (e.g. 418.67): 510.73.08
Are you trying to build on ARM? This repo doesn't support ARM currently.
I'm building on x86_64 (and Ubuntu 18.04)
I temporarily resolved it now. how to solve is below
Method 1. rollback Dockerfile like this
Method 2. Use docker buildx command (Don't need to modify Dockerfile)
$ cat script/docker/build.sh
docker buildx build . --rm -t <image_name> --load
I don't know the upper methods are perfect way but It's work
I find there are 2 parts in Dockerfile
One is for ARM, Another is for x86.
So I have to comment out upper chunk of Dockerfile and use from here