Facing rquirement error while building Docker-image after pynvml update?

sarvesh42

Sarvesh Kesharwani

Posted on March 14, 2023

Facing rquirement error while building Docker-image after pynvml update?

This is the build log on running build command

PS F:\Github_dsc\ivy\docker> docker build --no-cache -t ivy-container .
[+] Building 6.9s (17/18)
 => [internal] load build definition from Dockerfile                                                                                                                                                                           0.3s
 => => transferring dockerfile: 32B                                                                                                                                                                                            0.0s
 => [internal] load .dockerignore                                                                                                                                                                                              0.6s
 => => transferring context: 2B                                                                                                                                                                                                0.3s
 => [internal] load metadata for docker.io/library/ubuntu:20.04                                                                                                                                                                3.3s
 => [internal] load build context                                                                                                                                                                                              0.3s
 => => transferring context: 2B                                                                                                                                                                                                0.1s 
 => [ 1/14] FROM docker.io/library/ubuntu:20.04@sha256:9fa30fcef427e5e88c76bc41ad37b7cc573e1d79cecb23035e413c4be6e476ab                                                                                                        0.2s 
 => => resolve docker.io/library/ubuntu:20.04@sha256:9fa30fcef427e5e88c76bc41ad37b7cc573e1d79cecb23035e413c4be6e476ab                                                                                                          0.2s
 => CACHED [ 2/14] WORKDIR /ivy                                                                                                                                                                                                0.0s
 => [ 3/14] RUN if [ "$CLI" = "True" ]; then apt-get update     && apt-get install -y apt-transport-https ca-certificates curl gnupg2 lsb-release     && curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr   1.9s
 => CACHED [ 4/14] RUN apt-get update &&     apt-get install -y python3 python3-pip python3-tk &&     apt-get install -y libsm6 libxext6 libxrender-dev libgl1-mesa-glx &&     apt-get install -y python-opengl &&     apt-ge  0.0s 
 => CACHED [ 5/14] RUN pip3 install --no-cache-dir torch --extra-index-url https://download.pytorch.org/whl/cpu                                                                                                                0.0s 
 => CACHED [ 6/14] RUN export ver=$(pip show torch | grep Version | cut -d ' ' -f2) &&     pip3 install --no-cache-dir --upgrade torch-scatter -f https://data.pyg.org/whl/torch-$ver.html                                     0.0s 
 => CACHED [ 7/14] RUN git clone --progress --recurse-submodules https://github.com/unifyai/ivy --depth 1 &&     cd ivy &&     sed -i '/nvidia/d' requirements/requirements.txt &&     cat requirements/requirements.txt | gr  0.0s
 => CACHED [ 8/14] RUN cp ivy/requirements/requirements.txt .                                                                                                                                                                  0.0s 
 => CACHED [ 9/14] RUN pip3 install --no-cache-dir -r requirements.txt                                                                                                                                                         _0.0s 
 => ERROR [10/14] COPY requirements/optional.txt .                                                                                                                                                                             0.0s 
 => ERROR [11/14] COPY requirements/optional_gpu.txt .   _                                                                                                                                                                      0.0s 
 => CACHED [12/14] RUN pip3 install --no-cache-dir -r optional.txt                                                                                                                                                             0.0s 
_ => ERROR [13/14] COPY run_tests_CLI/test_dependencies.py .  _
Enter fullscreen mode Exit fullscreen mode

Solution:

Image description
copy "run_test_CLI" and "requirements" folders from root directory into "docker" folder

and run build command again from docker folder, this solved problem for me.
thanks

💖 💪 🙅 🚩
sarvesh42
Sarvesh Kesharwani

Posted on March 14, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related