paraphraser icon indicating copy to clipboard operation
paraphraser copied to clipboard

Docker build throwing tar extract error

Open csngh opened this issue 3 years ago • 4 comments

[+] Building 5.9s (14/17)                                                                                                                
 => [internal] load build definition from Dockerfile.cpu                                                                            0.0s
 => => transferring dockerfile: 1.02kB                                                                                              0.0s
 => [internal] load .dockerignore                                                                                                   0.0s
 => => transferring context: 2B                                                                                                     0.0s
 => [internal] load metadata for docker.io/library/ubuntu:20.04                                                                     5.3s
 => [internal] load build context                                                                                                   0.0s
 => => transferring context: 7.20kB                                                                                                 0.0s
 => [ 1/13] FROM docker.io/library/ubuntu:20.04@sha256:bea6d19168bbfd6af8d77c2cc3c572114eb5d113e6f422573c93cb605a0e2ffb             0.0s
 => CACHED [ 2/13] RUN apt-get update -qq     && apt-get install -y --no-install-recommends       wget       build-essential        0.0s
 => CACHED [ 3/13] RUN wget --no-check-certificate -O miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.3-Linux  0.0s
 => CACHED [ 4/13] WORKDIR /home                                                                                                    0.0s
 => CACHED [ 5/13] COPY download_model.sh download_model.sh                                                                         0.0s
 => CACHED [ 6/13] RUN ./download_model.sh                                                                                          0.0s
 => CACHED [ 7/13] RUN conda install pytorch==1.4.0 torchvision==0.5.0 cpuonly -c pytorch                                           0.0s
 => CACHED [ 8/13] COPY requirements.txt requirements.txt                                                                           0.0s
 => CACHED [ 9/13] RUN pip install -r requirements.txt                                                                              0.0s
 => ERROR [10/13] RUN tar -xvf m39v1.tar && rm -f m39v1.tar                                                                         0.5s
------
 > [10/13] RUN tar -xvf m39v1.tar && rm -f m39v1.tar:
#14 0.491 tar: This does not look like a tar archive
#14 0.491 tar: Skipping to next header
#14 0.491 tar: Exiting with failure status due to previous errors
------
executor failed running [/bin/sh -c tar -xvf m39v1.tar && rm -f m39v1.tar]: exit code: 2

csngh avatar Apr 05 '22 10:04 csngh

Thanks for the issue, @dakshvar22 will get back to you about it soon!

You may find help in the docs and the forum, too 🤗

sara-tagger avatar Apr 05 '22 12:04 sara-tagger

Hi! Can you check if m39v1.tar was downloaded successfully? Looks like that step didn't execute properly. You could also delete the docker cache and try building the image from scratch.

Out of curiosity: Why do you want to build the docker image? Can't you just reuse the docker image that's hosted online and run it?

dakshvar22 avatar Apr 05 '22 12:04 dakshvar22

Hi @dakshvar22 I saw m39v1.tar was not in the repo and it had added into gitignore. Where to download the file?

Out of curiosity: Why do you want to build the docker image? Can't you just reuse the docker image that's hosted online and run it?

I guess he wants to add more feature?

fifiteen82726 avatar Apr 13 '22 06:04 fifiteen82726

@fifiteen82726, reading Dockerfile we'll see that m39v1.tar is downloaded by COPY download_model.sh download_model.sh RUN ./download_model.sh. That's why it has been ignored. During building docker image, the downloading was failed. Therefore it was not a tar file. To work around this download the file manually, in Dockerfile, comment out lines COPY download_model.sh download_model.sh RUN ./download_model.sh, add line COPY m39v1.tar ./ instead. PS: Refer download_model.sh for download link

sysang avatar May 31 '22 17:05 sysang