2

How do I keep pip from compiling av, if I have python3-av installed through apt?

I'm performing a multi-arch Docker build with a Dockerfile that looks like this:

FROM python:3-bullseye
RUN apt-get update && apt-get install -y python3-av
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

One of the requirements (auto-editor) requires av. On ARM64 it attempts to build av from source, which takes more than 10 minutes. How do I keep pip from installing av anew?

1 Answer 1

0

As I understand, you want to make a check point after first install right?

You may separate this dockerfile into a baseimage.dockerfile and installation.dockerfile.

For baseimage.dockerfile

FROM python:3-bullseye RUN apt-get update && apt-get install -y python3-av

Then, you build with docker build ./baseimage.dockerfile -t python-av-base

This will allow you to make a checkpoint

For installation.dockerfile, run installation as you expect FROM python-av-base COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .