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

Docker build command fails on python tutorial page #219

Open
josros opened this issue Nov 28, 2023 · 0 comments
Open

Docker build command fails on python tutorial page #219

josros opened this issue Nov 28, 2023 · 0 comments

Comments

@josros
Copy link

josros commented Nov 28, 2023

Execution

Start a terminal and execute the docker build command stated in Step 1 of the python tutorial:

docker build \
    --build-arg language=python \
    -t snet_python_service https://github.com/singnet/dev-portal.git#master:/tutorials/docker

Expectation

The docker build command succeeds and I have a ready to start docker image on my computer

Actual behaviour

The docker build fails at step [5/11]:

 => [ 4/11] RUN apt-get install -y python3 python3-pip                    15.5s
 => ERROR [ 5/11] RUN pip3 install snet-cli                                9.5s
9.438 protobuf requires Python '>=3.7' but the running Python is 3.6.9
------
Dockerfile:25
--------------------
  23 |     RUN apt-get install -y python3 python3-pip
  24 |     
  25 | >>> RUN pip3 install snet-cli
  26 |     
  27 |     RUN SNETD_VERSION=`curl -s https://api.github.com/repos/singnet/snet-daemon/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")'` && \
--------------------
ERROR: failed to solve: process "/bin/sh -c pip3 install snet-cli" did not complete successfully: exit code: 1

Workaround

I used a local copy of the Dockerfile and changed:

RUN apt-get install -y python3 python3-pip

RUN pip3 install snet-cli

to:

RUN apt-get install -y python3 python3-pip

RUN pip3 install --upgrade pip && \
    pip3 install snet-cli

This way I was able to follow the tutorial up until Step 8. However, it leaded to maybe related error scenarios such as the problem that I could not execute snet organization metadata-init and others.
Maybe it is because the the python version and base image ubuntu:18.04 are outdated.

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

1 participant