Reputation: 35
I want to build a Docker Image based on a Python 3.8 Image and then install some requirements including Pandas on a ARM/V7 platform. But when it comes to install the pip requirements the process gets stuck.
Is there any way to use a different base image or change something else in the Docker file to run pandas in a Docker image on a device with ARM/V7 architecture?
Here is the dockerfile:
FROM python:3.8@sha256:45fbccbc4681e8d9ef517d43f9d0eb8f17b2beac00b0f9697bbf85354ae8a266
WORKDIR /app
EXPOSE 8002/tcp
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY . .
CMD ["python3", "-m", "monitoring"]
The requirements.txt:
pandas==1.3.3
requests==2.26.0
When i am building the Image with docker build -t rfu .
i get the following output:
Sending build context to Docker daemon 25.6kB
Step 1/7 : FROM python:3.8@sha256:45fbccbc4681e8d9ef517d43f9d0eb8f17b2beac00b0f9697bbf85354ae8a266
---> 0c665e140292
Step 2/7 : WORKDIR /app
---> Running in a5e6772c20f9
Removing intermediate container a5e6772c20f9
---> 5e7807e6f975
Step 3/7 : EXPOSE 8002/tcp
---> Running in d9f6cdc8aca1
Removing intermediate container d9f6cdc8aca1
---> bcd057ff5d87
Step 4/7 : COPY requirements.txt requirements.txt
---> d11ccce85d46
Step 5/7 : RUN pip install -r requirements.txt
---> Running in cd920fa4c18d
Collecting pandas==1.3.3
Downloading pandas-1.3.3.tar.gz (4.7 MB)
Installing build dependencies: started
Installing build dependencies: still running...
Installing build dependencies: still running...
Installing build dependencies: still running...
Installing build dependencies: still running...
Installing build dependencies: still running...
This is where the process get stuck.
Upvotes: 0
Views: 984
Reputation: 1
I had this issue and I ended up bumping my python version to 3.9 and using pandas==1.5.3
Upvotes: 0
Reputation: 41
I guess it takes time for compiling... Just use precompiled packages from https://piwheels.org/
RUN pip install --index-url=https://www.piwheels.org/simple --no-cache-dir -r requirements.txt
Upvotes: 4