简体   繁体   中英

Dockerfile build RUN: "file not found"

Hello everyone i'm having issues with building the dockerfile following this guide to run a python model for paraphrasing https://github.com/RasaHQ/paraphraser ,i'm new to docker but it seems like it can't find the download_model.sh, here's the error:

#10 sha256:94d3f967690340f8c35c43a1702fb522b42c465dd3f39622a5548afc2aac5b2c  
#10 0.470 /bin/sh: 1: /home/download_model.sh: not found  
#10 ERROR: executor failed running [/bin/sh -c /home/download_model.sh]: exit code: 127 

i think the problem lies in this section of the dockerfile:

  WORKDIR /home

  COPY download_model.sh download_model.sh
  RUN ./download_model.sh

I thought about adding this command in the dockerfile RUN dir:

  WORKDIR /home
  
  COPY download_model.sh download_model.sh
  RUN dir
  RUN ./download_model.sh

printing the following:

#10 [ 6/14] RUN dir
#10 sha256:3897e950f0add18c4f3eb3d7beba427134c711ea110c040575accdf1feddf627
#10 0.527 download_model.sh
#10 DONE 0.6s

is this print refering to what's inside /home in the image? if so download_model.sh should be there, than why it's not finding it when running the command RUN./download_model.sh ?

i've already tried to replace the separator, replacing CRLF to LF did the tric opening the file on visual studio, but didn't do anything

thanks

I still can't figure out what's specifically wrong, however since download_model.sh basically downloads a .tar from a drive folder, i manually downloaded the file into the dockerfile root folder and added this line to the dockerfile: COPY m39v1.tar./ to copy the model into the docker.

Still looking forward to someone with a proper solution!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM