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

Cannot build docker image #138

Open
p4thie opened this issue Oct 4, 2023 · 4 comments
Open

Cannot build docker image #138

p4thie opened this issue Oct 4, 2023 · 4 comments

Comments

@p4thie
Copy link

p4thie commented Oct 4, 2023

Describe the bug
Cannot build docker image using Dockerfile.

To Reproduce

  1. run command docker build -t <image-name> .
  2. docker fails to build the image with following error: ERROR: failed to solve: process "/bin/sh -c python3 setup.py install" did not complete successfully: exit code: 1

According to the output, docker fails to solve RUN python3 setup.py install, specifically, by the following error: huggingface-hub 0.17.3 is installed but huggingface_hub<0.17,>=0.16.4 is required by {'tokenizers'}

Temporal fix is that commenting out RUN python3 setup.py install, then resolving the conflict after building the image. However this is not ideal.

@mikeb-btw
Copy link

@p4thie Do you mind explaining what you mean by this?

then resolving the conflict after building the image

@mikeb-btw
Copy link

By the way, this worked for us:

FROM nvidia/cuda:12.1.0-base-ubuntu22.04
# replace CUDA version to your CUDA version.
# You can check your CUDA version with below.
# nvcc -V

RUN apt-get update && \
    apt-get install -y git python3 python3-pip

RUN pip3 install torch torchvision torchaudio huggingface-hub==0.17.3 fastapi uvicorn[standard] fsspec[http]==2023.1.0 --no-cache-dir

COPY ../ .

RUN python3 setup.py install

EXPOSE 8503

CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8503"]
# Run this using 'docker run -it -d -p <YOUR PORT>:8503 --gpus all <IMAGE NAME>

@p4thie
Copy link
Author

p4thie commented Oct 10, 2023

@mikeb-btw I was trying to run pip command in the docker environment after building the image (this is what I meant by resolving the conflict ...). Your solution is a lot better than that. For now, anyone has the similar problem might want to modify Dockerfile as you did, then wait for the fix by the nougat team. Thanks a lot!

@fqassemi
Copy link

This fix might help:
#208

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

3 participants