From dcdefaa4c9b9034162e0aaf8a2ea50752daee28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=BD=AE?= Date: Tue, 18 Nov 2025 19:33:25 +0800 Subject: [PATCH] add npx uv --- Dockerfile | 12 ++++++++++++ Dockerfile.modelscope | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/Dockerfile b/Dockerfile index b509b60..9d87a1e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,8 +12,20 @@ ENV PYTHONUNBUFFERED=1 RUN apt-get update && apt-get install -y \ curl \ wget \ + gnupg2 \ + ca-certificates \ && rm -rf /var/lib/apt/lists/* +# 安装Node.js (支持npx命令) +RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ + apt-get install -y nodejs + +# 安装uv (Python包管理器) +RUN curl -LsSf https://astral.sh/uv/install.sh | sh + +# 设置环境变量以便访问uv +ENV PATH="/root/.cargo/bin:$PATH" + # 复制requirements文件并安装Python依赖 COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt diff --git a/Dockerfile.modelscope b/Dockerfile.modelscope index 981919e..7020ab7 100644 --- a/Dockerfile.modelscope +++ b/Dockerfile.modelscope @@ -13,8 +13,20 @@ RUN sed -i 's|http://deb.debian.org|http://mirrors.aliyun.com|g' /etc/apt/source apt-get update && apt-get install -y \ curl \ wget \ + gnupg2 \ + ca-certificates \ && rm -rf /var/lib/apt/lists/* +# 安装Node.js (支持npx命令) +RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ + apt-get install -y nodejs + +# 安装uv (Python包管理器) +RUN curl -LsSf https://astral.sh/uv/install.sh | sh + +# 设置环境变量以便访问uv +ENV PATH="/root/.cargo/bin:$PATH" + # 复制requirements文件并安装Python依赖 COPY requirements.txt . RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt