I ran out of storage space on my MacBook, so I tried running this script on my Raspberry Pi instead. I was using Docker on my Raspberry Pi, So I decided to choose a way to create a Docker image by Dockerfile. However, this method failed.
After reviewing the log, I realized that some packages defined in requirements.txt had to be compiled to work in my environment. However, the base image applied to the Dockerfile is a "slim" version that lacks some elements needed for compiles. That's the cause of the error. So I solved the problem by changing the base image from python:3.8-slim-buster to python:latest. The Docker image created in this way took a long time to create, but it worked perfectly on my Raspberry Pi.
However, this simple solution has a little problem. The size of the pulled image becomes quite large. Therefore, this solution may be inconvenient for some people. This script is used to download a large amount of data, but it would still be better to have less download capacity. So I want to discuss this.
I ran out of storage space on my MacBook, so I tried running this script on my Raspberry Pi instead. I was using Docker on my Raspberry Pi, So I decided to choose a way to create a Docker image by
Dockerfile
. However, this method failed.After reviewing the log, I realized that some packages defined in
requirements.txt
had to be compiled to work in my environment. However, the base image applied to theDockerfile
is a "slim" version that lacks some elements needed for compiles. That's the cause of the error. So I solved the problem by changing the base image frompython:3.8-slim-buster
topython:latest
. The Docker image created in this way took a long time to create, but it worked perfectly on my Raspberry Pi.However, this simple solution has a little problem. The size of the pulled image becomes quite large. Therefore, this solution may be inconvenient for some people. This script is used to download a large amount of data, but it would still be better to have less download capacity. So I want to discuss this.
My environment: