5

I'm trying to run tacotron2 on docker within Ubuntu WSL2 (v.20.04) on Win10 2004 build. Docker is installed and running and I can run hello world successfully.

(There's a nearly identical question here, but nobody has answered it.)

When I try to run docker build -t tacotron-2_image docker/ I get the error:

unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/nate/docker/Dockerfile: no such file or directory

So then I navigated in bash to where docker is installed (/var/lib/docker) and tried to run it there, and got the same error. In both cases I created a docker directory, but kept getting that error in all cases.

How can I get this to work?

HerrimanCoder
  • 6,835
  • 24
  • 78
  • 158

3 Answers3

3

As mentioned here, the error might have nothing to do with "symlinks", and everything with the lack of Dockerfile, which should be in the Tacotron-2/docker folder.

docker build does mention:

The docker build command builds Docker images from a Dockerfile and a “context”.
A build’s context is the set of files located in the specified PATH or URL.

In your case, docker build -t tacotron-2_image docker/ is supposed to be executed in the path you have cloned the Rayhane-mamah/Tacotron-2 repository.

To be sure, you could specify said Dockerfile, but that should not be needed:

docker build -t tacotron-2_image -f docker/Dockerfile docker/

Or:

cd
git clone https://github.com/Rayhane-mamah/Tacotron-2
cd Tacotron-2
cd docker
docker build -t tacotron-2_image .

I thought these commands I'm executing are for the purpose of installing it

To build the image, you need the sources (the repository to clone).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • VonC: I executed your first example and got `unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/nate/docker/Dockerfile: no such file or directory`. As for your 2nd example, how can I find where Tacotron is, and why would it be anywhere, since I thought it hasn't been installed yet. I thought these commands I'm executing are for the purpose of installing it. ?? – HerrimanCoder Aug 16 '20 at 16:49
  • @HerrimanCoder Everything depends on a step I did not originally mention in the answer (now edited): you cloning the Tacotron-2 repository. – VonC Aug 16 '20 at 16:53
  • Thanks VonC. You got me further down the road. I have posted a follow-up question to get me the rest of the way, I hope you will take a look: https://stackoverflow.com/questions/63440113/how-to-install-and-run-tacotron2-on-ubuntu-wsl – HerrimanCoder Aug 16 '20 at 18:02
2

If the name of you Dockerfile is with capital F rename it

0

For others like me who somehow couldn't get it works because of symlink

just copy out your files out to a new directory that hasn't been symlink and build your image from there

if ony if you've confirm that your Dockerfile isn't dockerfile .Dockerfile ,DockerFile or dockerfile.txt .

My OS elementary which is base on ubuntu.