Open p4thie opened 12 months ago
@p4thie Do you mind explaining what you mean by this?
then resolving the conflict after building the image
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>
@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!
This fix might help: https://github.com/facebookresearch/nougat/pull/208
Describe the bug Cannot build docker image using Dockerfile.
To Reproduce
docker build -t <image-name> .
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 followingerror: 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.