ソースを参照

更新docker镜像地址

更新docker镜像地址
dangyunlong 3 週間 前
コミット
994aed59a3
2 ファイル変更4 行追加2 行削除
  1. 3 1
      Dockerfile
  2. 1 1
      app.py

+ 3 - 1
Dockerfile

@@ -1,6 +1,6 @@
 # Dockerfile for AIServ
 # 使用 Python 3.11(稳定兼容)
-FROM python:3.11-slim
+FROM docker.m.daocloud.io/library/python:3.11-slim
 
 # 设置环境变量
 ENV PYTHONDONTWRITEBYTECODE=1 \
@@ -34,6 +34,8 @@ RUN pip install --no-cache-dir numpy==2.2.6
 
 # 2.3 安装其他依赖
 RUN pip install --no-cache-dir \
+    --index-url https://pypi.tuna.tsinghua.edu.cn/simple \
+    --trusted-host pypi.tuna.tsinghua.edu.cn \
     flask==3.1.2 \
     flask-cors==6.0.1 \
     scikit-learn==1.7.2 \

+ 1 - 1
app.py

@@ -31,7 +31,7 @@ def create_app():
     def index():
         return jsonify({
             'service': 'AIServ',
-            'version': '1.2',
+            'version': '1.3',
             'status': 'running'
         })