Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
data_report
/
daw
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ba377468
authored
Jun 26, 2026
by
江名洋
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
build(docker): 降级numpy并移除编译工具链
1 parent
7b83aaca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
docker/Dockerfile
docker/Dockerfile
View file @
ba37746
FROM
python:3.11-slim
FROM
python:3.11-slim
# 兼容旧 CPU 的环境设置
# 兼容旧 CPU 的环境设置
(OpenBLAS 使用兼容模式)
ENV
OPENBLAS_CORETYPE=Haswell
ENV
OPENBLAS_CORETYPE=Haswell
# PyPI 镜像加速(清华源)
# PyPI 镜像加速(清华源)
...
@@ -8,15 +8,11 @@ ENV PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
...
@@ -8,15 +8,11 @@ ENV PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
WORKDIR
/app
WORKDIR
/app
# 安装编译工具链(用于源码编译 numpy,兼容旧 CPU)
RUN
apt-get update
&&
apt-get install -y --no-install-recommends
\
gcc g++ gfortran libopenblas-dev liblapack-dev
\
&&
rm -rf /var/lib/apt/lists/
*
COPY requirements.txt .
COPY requirements.txt .
#
从源码编译 numpy 1.x,避免预编译 wheel 使用 x86-64-v2 指令集
#
numpy 1.24.4 使用 manylinux2014 wheel,兼容旧 x86-64 CPU
RUN
pip install --no-cache-dir
--no-binary
=
numpy
numpy
==
1.26
.4
RUN
pip install --no-cache-dir
numpy
==
1.24
.4
RUN
pip install --no-cache-dir -r requirements.txt
RUN
pip install --no-cache-dir -r requirements.txt
RUN
python -c
"import numpy; print('numpy version:', numpy.__version__)"
COPY . .
COPY . .
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment