docker – Can’t install pytorch 1.13.1 in airflow 2.2.5

I am trying to install pytorch 1.13.1 in airflow-2.2.5 docker image via a Dockerfile like this:

FROM apache/airflow:2.2.5-python3.9


# A trick to make image building functional both on macOS, as well as, other unix based systems
# Create airflow group and user as root then switch to airflow user
USER root
RUN groupadd -r airflow
USER airflow
# each folder in AIRFLOW_HOME can be used as import in python
# install extra requirements
COPY requirements.txt /
RUN pip install --user --no-cache-dir -r /requirements.txt

where requirements.txt contains line:


I have 64 bit version of python. When I try to build the image, I get

#15 1.263 ERROR: Could not find a version that satisfies the requirement pytorch~=1.13.1 (from versions: 0.1.2, 1.0.2)
#15 1.263 ERROR: No matching distribution found for pytorch~=1.13.1

What was also tried:

  1. Using 2.7.1-python3.9
  2. Using 2.7.1-python3.11

As one can see the target version is seen within the torch wheel list: torch-1.13.1-cp39-cp39-manylinux2014_aarch64.whl.

Whatever I try I am not able to see any other version than 0.1.2, 1.0.2. How can I install pytorch 1.13.1 in apache/airflow:2.2.5-python3.9?

Read more here: Source link