Closed isanwenyu closed 6 months ago
docker build -t xiaogpt .
=> ERROR [builder 4/4] RUN python3 -m venv .venv && .venv/bin/pip install --no-cache-dir -r 43.5s ------ > [builder 4/4] RUN python3 -m venv .venv && .venv/bin/pip install --no-cache-dir -r requirements.txt: 29.09 ERROR: Could not find a version that satisfies the requirement aiohttp==3.9.1 (from versions: none) 29.09 ERROR: No matching distribution found for aiohttp==3.9.1 43.35 43.35 [notice] A new release of pip is available: 23.0.1 -> 23.3.2 43.35 [notice] To update, run: python3 -m pip install --upgrade pip ------ Dockerfile:4 -------------------- 2 | WORKDIR /app 3 | COPY requirements.txt . 4 | >>> RUN python3 -m venv .venv && .venv/bin/pip install --no-cache-dir -r requirements.txt 5 | 6 | FROM python:3.10-slim -------------------- ERROR: failed to solve: process "/bin/sh -c python3 -m venv .venv && .venv/bin/pip install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1
问题已解决,修改Dockerfile,给pip安装添加清华大学源 RUN python3 -m venv .venv && .venv/bin/pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN python3 -m venv .venv && .venv/bin/pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple