add npx uv

This commit is contained in:
朱潮 2025-11-18 19:33:25 +08:00
parent 081089a053
commit dcdefaa4c9
2 changed files with 24 additions and 0 deletions

View File

@ -12,8 +12,20 @@ ENV PYTHONUNBUFFERED=1
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
curl \ curl \
wget \ wget \
gnupg2 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* && 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依赖 # 复制requirements文件并安装Python依赖
COPY requirements.txt . COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt

View File

@ -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 \ apt-get update && apt-get install -y \
curl \ curl \
wget \ wget \
gnupg2 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* && 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依赖 # 复制requirements文件并安装Python依赖
COPY requirements.txt . COPY requirements.txt .
RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt