Hi team,
I’ve been trying to build a container that use python3 and pip but I’m having issues trying to install requirements.
Python seems to be working by itself but when trying to use this for our module with FROM torizon/arm64v8-debian-base
python3-pip is not found, but it seems that it can be installed.
pip works if I tried to use a python image (for example FROM python:3.7-alpine as base
). I’ve also tried with RUN pip install -U pip
, RUN python3-pip
, RUN pip3
or RUN pip
but also fail.
Dockerfile:
FROM torizon/arm64v8-debian-base
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-setuptools \
&& rm -rf /var/lib/apt/lists/*
COPY . /FATorizonDemo
WORKDIR /FATorizonDemo
RUN cat requirements.txt
RUN pip install -r requirements.txt
CMD ["python3", "main.py"]
Output:
docker build -t alvarotx/fatorizondemo .
Sending build context to Docker daemon 157.6MB
Step 1/8 : FROM torizon/arm64v8-debian-base
# Executing 1 build trigger
---> Using cache
---> b2ce468568e7
Step 2/8 : RUN apt-get update
---> Using cache
---> cc92bf81c4c4
Step 3/8 : RUN apt-get install -y --no-install-recommends python3 python3-pip python3-setuptools && rm -rf /var/lib/apt/lists/*
---> Using cache
---> e2f674221fe7
Step 4/8 : COPY . /FATorizonDemo
---> 5b2c34c1e2f8
Step 5/8 : WORKDIR /FATorizonDemo
---> Running in 2d0b9d460e1b
Removing intermediate container 2d0b9d460e1b
---> f1075e137eb6
Step 6/8 : RUN cat requirements.txt
---> Running in 66174c3f4fef
Flask==1.1.2Removing intermediate container 66174c3f4fef
---> d282160dd898
Step 7/8 : RUN pip install -r requirements.txt
---> Running in e05f6ac82248
/bin/sh: 1: pip: not found
The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 127
Any idea?
Thanks and kind regards,
Alvaro.