Docker build issue
akarX23 opened this issue · 3 comments
System Info
Hi,
I tried building the image using:
docker build -t tgi-gaudi .
Getting this error:
Step 10/36 : RUN cargo chef prepare --recipe-path recipe.json
---> Running in 12dffcecc6a3
info: syncing channel updates for '1.75.0-x86_64-unknown-linux-gnu'
error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-1.75.0.toml.sha256' to '/usr/local/rustup/tmp/2k9fuhd5awi7j8ky_file': failed to make network request: error sending request for url (https://static.rust-lang.org/dist/channel-rust-1.75.0.toml.sha256): error trying to connect: error:1408F10B:SSL routines:ssl3_get_record:wrong version number:ssl/record/ssl3_record.c:332:: error trying to connect: error:1408F10B:SSL routines:ssl3_get_record:wrong version number:ssl/record/ssl3_record.c:332:: error:1408F10B:SSL routines:ssl3_get_record:wrong version number:ssl/record/ssl3_record.c:332:: error:1408F10B:SSL routines:ssl3_get_record:wrong version number:ssl/record/ssl3_record.c:332:
The command '/bin/sh -c cargo chef prepare --recipe-path recipe.json' returned a non-zero code: 1
Please suggest a solution to this, thanks!
Information
- Docker
- The CLI directly
Tasks
- An officially supported command
- My own modifications
Reproduction
git clone https://github.com/huggingface/tgi-gaudi
cd tg-gaudi
docker build -t tgi-gaudi .
Expected behavior
The image should build without issues
Hi @akarX23, I'm not able to reproduce this issue. It looks like some network problem during Rust installation. Could you share more information about your setup?
Hi @kdamaszk , thanks for the response.
Apparently, it was a proxy issue. I had to inject the proxy variables in the Dockerfile separately. I was under the impression that the proxies will be accepted if defined in /etc/systemd/system/docker.service.d/http-proxy.conf
but it seems like that wasn't the case.
I also saw another weird thing, at the start of the Dockerfile I set the variables like this:
ENV HTTP_PROXY=http://<proxy>
ENV HTTPS_PROXY=http://<proxy>
ENV http_proxy=http://<proxy>
ENV https_proxy=http://<proxy>
However, at some point in the docker file the https_proxy
and HTTPS_PROXY
variables automatically had https
in the proxy url even though I had specifies http
as above. Any idea about this?
The issue though has been solved, so no worries about that.
However, at some point in the docker file the
https_proxy
andHTTPS_PROXY
variables automatically hadhttps
in the proxy url even though I had specifieshttp
as above. Any idea about this?
I'm not sure what could be the reason of that. TGI doesn't touch any proxy settings as far as I know.
Closing this ticket as you docker build issue has been solved. Thanks!