Установите пакеты Python в базовый образ Docker Alpine.Python

Программы на Python
Ответить Пред. темаСлед. тема
Anonymous
 Установите пакеты Python в базовый образ Docker Alpine.

Сообщение Anonymous »

Мне необходимо установить пакеты Python из файла require.txt в docker.
Я использую «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
и в моем файле require.txt упоминается множество модулей Python, включая scipy, numpy и другие.
При установке пакетов он возвращает ошибку как :

Код: Выделить всё

#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
Я попробовал запустить файл require.txt без упоминания о версиях, но это не сработало.

Подробнее здесь: https://stackoverflow.com/questions/771 ... base-image
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Python»