Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build failed creating '/app' #567

Open
4 tasks done
YoongiKim opened this issue Jun 24, 2020 · 1 comment
Open
4 tasks done

Docker build failed creating '/app' #567

YoongiKim opened this issue Jun 24, 2020 · 1 comment

Comments

@YoongiKim
Copy link

Prerequisites

System information

  • Using docker image: tensorflow/tensorflow:1.12.0-gpu-py3

Description

How to reproduce

git clone https://github.com/hanxiao/bert-as-service.git
cd bert-as-service
docker build -t bert-as-service -f ./docker/Dockerfile .

Output

~/Projects/bert-as-service$ docker build -t bert-as-service -f ./docker/Dockerfile .
Sending build context to Docker daemon  13.45MB
Step 1/7 : FROM tensorflow/tensorflow:1.12.0-gpu-py3
 ---> 413b9533f92a
Step 2/7 : RUN pip install bert-serving-server[http]
 ---> Using cache
 ---> 84941411ab9c
Step 3/7 : COPY ./docker/entrypoint.sh /app
 ---> Using cache
 ---> e2fbe8e0b7ca
Step 4/7 : WORKDIR /app
Cannot mkdir: /app is not a directory

Error message is Cannot mkdir: /app is not a directory

Original docker/Dockerfile

FROM tensorflow/tensorflow:1.12.0-gpu-py3
RUN pip install bert-serving-server[http]
COPY ./docker/entrypoint.sh /app
WORKDIR /app
ENTRYPOINT ["/app/entrypoint.sh"]
CMD []
HEALTHCHECK --timeout=5s CMD curl -f http://localhost:8125/status/server || exit 1

If I add command RUN ls -al / before WORKDIR /app

drwxr-xr-x   1 root root         6 Jun 24 08:16 .
drwxr-xr-x   1 root root         6 Jun 24 08:16 ..
-rwxr-xr-x   1 root root         0 Jun 24 08:16 .dockerenv
**-rwxrwxr-x   1 root root        78 Jun 24 08:01 app**
drwxr-xr-x   1 root root       179 Nov  5  2018 bin
drwxr-xr-x   2 root root         6 Apr 12  2016 boot
drwxr-xr-x   5 root root       340 Jun 24 08:16 dev
drwxr-xr-x   1 root root        66 Jun 24 08:16 etc
drwxr-xr-x   2 root root         6 Apr 12  2016 home
drwxr-xr-x   1 root root        56 Nov  5  2018 lib
drwxr-xr-x   2 root root        34 Oct  5  2018 lib64
drwxr-xr-x   2 root root         6 Oct  5  2018 media
drwxr-xr-x   2 root root         6 Oct  5  2018 mnt
drwxr-xr-x   2 root root       131 Nov  5  2018 notebooks
drwxr-xr-x   2 root root         6 Oct  5  2018 opt
dr-xr-xr-x 280 root root         0 Jun 24 08:16 proc
drwx------   1 root root        20 Nov  5  2018 root
drwxr-xr-x   1 root root        27 Nov  5  2018 run
-rwxrwxr-x   1 root root       733 Nov  5  2018 run_jupyter.sh
drwxr-xr-x   1 root root        21 Oct 19  2018 sbin
drwxr-xr-x   2 root root         6 Oct  5  2018 srv
dr-xr-xr-x  13 root root         0 Jun 24 07:55 sys
-rw-r--r--   1 root root 281651790 Nov  5  2018 tensorflow_gpu-1.12.0-cp35-cp35m-manylinux1_x86_64.whl
drwxrwxrwt   1 root root         6 Jun 24 08:16 tmp
drwxr-xr-x   1 root root        19 Oct  5  2018 usr
drwxr-xr-x   1 root root        90 Nov  5  2018 var

As you see /app is not a directory.

My fix

FROM tensorflow/tensorflow:1.12.0-gpu-py3
RUN pip install bert-serving-server[http]
COPY ./docker/entrypoint.sh /app/  # <----- appended '/'
WORKDIR /app
ENTRYPOINT ["/app/entrypoint.sh"]
CMD []
HEALTHCHECK --timeout=5s CMD curl -f http://localhost:8125/status/server || exit 1

And it works as OK.

Successfully built 44a1bfa8a89f
Successfully tagged bert-as-service:latest

I will add pull requests

YoongiKim pushed a commit to YoongiKim/bert-as-service that referenced this issue Jun 24, 2020
@varshaneya
Copy link
Contributor

@hanxiao can you merge the PR #572 to overcome this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants