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

Missing pip leads to failure in building Docker image #1002

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

r1235613
Copy link

@r1235613 r1235613 commented Jul 2, 2023

I encountered the following error message when building a Docker image.
By adding py3-pip, I was able to resolve this issue.
My system is a KVM virtual machine running on Proxmox, with Ubuntu 22.04.2 LTS as the operating system.

root@htmdocker:~/htm.docker/htm.core# docker build --build-arg arch=amd64  .
[+] Building 10.7s (11/18)                                                                                                                         
 => [internal] load .dockerignore                                                                                                             0.0s
 => => transferring context: 2B                                                                                                               0.0s
 => [internal] load build definition from Dockerfile                                                                                          0.0s
 => => transferring dockerfile: 2.48kB                                                                                                        0.0s
 => [internal] load metadata for docker.io/multiarch/alpine:amd64-latest-stable                                                               0.7s
 => [build  1/14] FROM docker.io/multiarch/alpine:amd64-latest-stable@sha256:46847607e30096a3f365d9944dddccf60f1b9bf3fb1383694c25a470345f524  0.0s
 => [internal] load build context                                                                                                             0.0s
 => => transferring context: 884.14kB                                                                                                         0.0s
 => CACHED [build  2/14] RUN echo "Building HTM foramd64" && uname -a                                                                         0.0s
 => CACHED [build  3/14] RUN apk add --update      cmake     make     g++     git     python3-dev     py3-numpy                               0.0s
 => [build  4/14] ADD . /usr/local/src/htm.core                                                                                               4.3s
 => [build  5/14] WORKDIR /usr/local/src/htm.core                                                                                             5.0s
 => [build  6/14] RUN ln -s /usr/bin/python3 /usr/local/bin/python && python --version                                                        0.3s
 => ERROR [build  7/14] RUN python -m pip install --upgrade setuptools pip wheel                                                              0.4s
------
 > [build  7/14] RUN python -m pip install --upgrade setuptools pip wheel:
#0 0.387 /usr/local/bin/python: No module named pip
------
Dockerfile:45
--------------------
  43 |     RUN ln -s /usr/bin/python3 /usr/local/bin/python && python --version 
  44 |     
  45 | >>> RUN python -m pip install --upgrade setuptools pip wheel
  46 |     
  47 |     # Install
--------------------
ERROR: failed to solve: process "/bin/sh -c python -m pip install --upgrade setuptools pip wheel" did not complete successfully: exit code: 1

@dkeeney
Copy link

dkeeney commented Jul 2, 2023

I don't know much about docker but I don't see where it builds htm.core from sources.
The pip install of htm.core is not supported because we don't do the builds for PyPl any more.

@r1235613
Copy link
Author

r1235613 commented Jul 3, 2023

Many instructions within the Dockerfile make use of pip. If py3-pip is not added, the aforementioned error will occur. This might be due to updates in the base image, necessitating additional installation.

RUN python -m pip install --upgrade setuptools pip wheel

@dkeeney
Copy link

dkeeney commented Jul 3, 2023

I don't see any problem with doing this. However, I know nothing about Docker so I don't feel qualified to judge if this is the correct way to fix the problem.

I am requesting @ctrl-z-9000-times or @breznak to take a look.

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

Successfully merging this pull request may close these issues.

2 participants