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 7c167420
authored
Jun 26, 2026
by
江名洋
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复错误
1 parent
38c43514
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
docker/Dockerfile
docker/Dockerfile
View file @
7c16742
...
@@ -3,8 +3,9 @@ FROM python:3.11-slim
...
@@ -3,8 +3,9 @@ FROM python:3.11-slim
# PyPI 镜像加速(清华源)
# PyPI 镜像加速(清华源)
ENV
PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
ENV
PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
# 运行时指定 OpenBLAS 使用兼容内核
# 运行时指定 OpenBLAS 使用最通用的内核 (Generic) 以避免 Illegal Instruction
ENV
OPENBLAS_CORETYPE=PRESCOTT
# 之前的 PRESCOTT 可能在某些极其古老或虚拟化的 CPU 上仍有问题
ENV
OPENBLAS_CORETYPE=Generic
WORKDIR
/app
WORKDIR
/app
...
@@ -14,12 +15,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
...
@@ -14,12 +15,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&&
rm -rf /var/lib/apt/lists/
*
&&
rm -rf /var/lib/apt/lists/
*
COPY requirements.txt .
COPY requirements.txt .
# 从源码编译 numpy:基线 SSE3
(此 CPU 支持),禁止 dispatch 到 SSSE3+
# 从源码编译 numpy:基线 SSE3
,禁止 dispatch
RUN
pip install --no-cache-dir --no-binary
=
numpy
numpy
==
1.26.4
\
RUN
pip install --no-cache-dir --no-binary
=
numpy
numpy
==
1.26.4
\
-Csetup-args
=
-Dcpu-baseline
=
sse3
\
-Csetup-args
=
-Dcpu-baseline
=
sse3
\
-Csetup-args
=
-Dcpu-dispatch
=
none
-Csetup-args
=
-Dcpu-dispatch
=
none
RUN
pip install --no-cache-dir -r requirements.txt
RUN
pip install --no-cache-dir -r requirements.txt
# 验证关键库是否能正常导入(在构建阶段提前暴露 SIGILL)
RUN
python -c
"import numpy; print('numpy:', numpy.__version__)"
RUN
python -c
"import numpy; print('numpy:', numpy.__version__)"
RUN
python -c
"import pandas; print('pandas:', pandas.__version__)"
RUN
python -c
"import pydantic_core; print('pydantic-core OK')"
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