Now that dask/distributed have dropped Python 3.8 it is no longer possible to install the latest source into the default container image.
This happens because the current default Python version in the container builds is 3.8.
FROM ghcr.io/dask/dask:latest
# Install latest dev builds of Dask and Distributed
RUN pip install git+https://github.com/dask/distributed@main
RUN pip install git+https://github.com/dask/dask@main
$ docker build --no-cache -t jacobtomlinson/dask:latest .
[+] Building 10.6s (5/6)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 237B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for ghcr.io/dask/dask:latest 0.0s
=> CACHED [1/3] FROM ghcr.io/dask/dask:latest 0.0s
=> ERROR [2/3] RUN pip install git+https://github.com/dask/distributed@main 10.6s
------
> [2/3] RUN pip install git+https://github.com/dask/distributed@main:
#0 2.031 Collecting git+https://github.com/dask/distributed@main
#0 2.031 Cloning https://github.com/dask/distributed (to revision main) to /tmp/pip-req-build-l5l3ef5a
#0 2.043 Running command git clone --filter=blob:none --quiet https://github.com/dask/distributed /tmp/pip-req-build-l5l3ef5a
#0 4.506 Resolved https://github.com/dask/distributed to commit 6b04277db0f7b07850f1c2ffb97e7a8d7b3f6b46
#0 4.531 Installing build dependencies: started
#0 7.015 Installing build dependencies: finished with status 'done'
#0 7.016 Getting requirements to build wheel: started
#0 8.269 Getting requirements to build wheel: finished with status 'done'
#0 8.279 Installing backend dependencies: started
#0 9.425 Installing backend dependencies: finished with status 'done'
#0 9.428 Preparing metadata (pyproject.toml): started
#0 9.906 Preparing metadata (pyproject.toml): finished with status 'done'
#0 9.941 Requirement already satisfied: pyyaml>=5.3.1 in /opt/conda/lib/python3.8/site-packages (from distributed==2023.5.0+11.g6b04277d) (6.0)
#0 9.942 Requirement already satisfied: cloudpickle>=1.5.0 in /opt/conda/lib/python3.8/site-packages (from distributed==2023.5.0+11.g6b04277d) (2.2.1)
#0 10.18 Collecting dask==2023.5.0
#0 10.32 Downloading dask-2023.5.0-py3-none-any.whl (1.2 MB)
#0 10.43 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 10.9 MB/s eta 0:00:00
#0 10.45 Requirement already satisfied: msgpack>=1.0.0 in /opt/conda/lib/python3.8/site-packages (from distributed==2023.5.0+11.g6b04277d) (1.0.4)
#0 10.45 Requirement already satisfied: toolz>=0.10.0 in /opt/conda/lib/python3.8/site-packages (from distributed==2023.5.0+11.g6b04277d) (0.12.0)
#0 10.45 Requirement already satisfied: tornado>=6.0.4 in /opt/conda/lib/python3.8/site-packages (from distributed==2023.5.0+11.g6b04277d) (6.2)
#0 10.45 Requirement already satisfied: zict>=2.2.0 in /opt/conda/lib/python3.8/site-packages (from distributed==2023.5.0+11.g6b04277d) (2.2.0)
#0 10.45 Requirement already satisfied: tblib>=1.6.0 in /opt/conda/lib/python3.8/site-packages (from distributed==2023.5.0+11.g6b04277d) (1.7.0)
#0 10.45 Requirement already satisfied: psutil>=5.7.2 in /opt/conda/lib/python3.8/site-packages (from distributed==2023.5.0+11.g6b04277d) (5.9.4)
#0 10.45 Requirement already satisfied: urllib3>=1.24.3 in /opt/conda/lib/python3.8/site-packages (from distributed==2023.5.0+11.g6b04277d) (1.26.13)
#0 10.45 Requirement already satisfied: click>=8.0 in /opt/conda/lib/python3.8/site-packages (from distributed==2023.5.0+11.g6b04277d) (8.1.3)
#0 10.45 Requirement already satisfied: packaging>=20.0 in /opt/conda/lib/python3.8/site-packages (from distributed==2023.5.0+11.g6b04277d) (23.0)
#0 10.45 Requirement already satisfied: sortedcontainers>=2.0.5 in /opt/conda/lib/python3.8/site-packages (from distributed==2023.5.0+11.g6b04277d) (2.4.0)
#0 10.45 Requirement already satisfied: locket>=1.0.0 in /opt/conda/lib/python3.8/site-packages (from distributed==2023.5.0+11.g6b04277d) (1.0.0)
#0 10.46 Requirement already satisfied: jinja2>=2.10.3 in /opt/conda/lib/python3.8/site-packages (from distributed==2023.5.0+11.g6b04277d) (3.1.2)
#0 10.46 ERROR: Package 'distributed' requires a different Python: 3.8.16 not in '>=3.9'
------
Dockerfile:4
--------------------
2 |
3 | # Install latest dev builds of Dask and Distributed
4 | >>> RUN pip install git+https://github.com/dask/distributed@main
5 | RUN pip install git+https://github.com/dask/dask@main
6 |
--------------------
ERROR: failed to solve: process "/bin/bash -c pip install git+https://github.com/dask/distributed@main" did not complete successfully: exit code: 1
The current workaround would be to explicitly use one of the versioned container images.
FROM ghcr.io/dask/dask:latest-py3.10
# Install latest dev builds of Dask and Distributed
RUN pip install git+https://github.com/dask/distributed@main
RUN pip install git+https://github.com/dask/dask@main
Now that dask/distributed have dropped Python 3.8 it is no longer possible to install the latest source into the default container image.
This happens because the current default Python version in the container builds is 3.8.
The current workaround would be to explicitly use one of the versioned container images.