Я использую «python:3.10.10-alpine» в качестве базового образа и устанавливаю пакеты из файла require.txt.
/>Вот мой файл докера для справки:
Код: Выделить всё
FROM python:3.10.10-alpine
RUN apk update && \
apk add --no-cache wget && \
apk add --no-cache build-base libffi-dev openssl-dev && \
apk add python3 py3-pip gcc musl-dev
RUN pip install --no-cache-dir --upgrade pip
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
При установке пакетов он возвращает ошибку как :
Код: Выделить всё
#10 1305.7 ERROR: Could not find a version that satisfies the requirement tensorflow==2.11.0 (from versions: none)
#10 1305.7 ERROR: No matching distribution found for tensorflow==2.11.0
#10 ERROR: process "/bin/sh -c pip install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1
------
> [5/5] RUN pip install --no-cache-dir -r requirements.txt:
1157.3 Installing build dependencies: still running...
1220.5 Installing build dependencies: still running...
1293.2 Installing build dependencies: still running...
1304.1 Installing build dependencies: finished with status 'done'
1304.1 Getting requirements to build wheel: started
1304.8 Getting requirements to build wheel: finished with status 'done'
1304.8 Preparing metadata (pyproject.toml): started
1305.5 Preparing metadata (pyproject.toml): finished with status 'done'
1305.7 ERROR: Could not find a version that satisfies the requirement tensorflow==2.11.0 (from versions: none)
1305.7 ERROR: No matching distribution found for tensorflow==2.11.0
------
Dockerfile:11
--------------------
9 |
10 | COPY requirements.txt .
11 | >>> RUN pip install --no-cache-dir -r requirements.txt
--------------------
ERROR: failed to solve: process "/bin/sh -c pip install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1
Подробнее здесь: https://stackoverflow.com/questions/771 ... base-image