修改dockerfile.bash
This commit is contained in:
parent
7ca3228dd5
commit
21f206f573
|
|
@ -8,17 +8,13 @@ FROM registry.t-aaron.com/python:3.11-slim
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
# 配置 apt 使用更稳定的镜像源并安装系统依赖
|
||||
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources || \
|
||||
sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list || true \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
gcc \
|
||||
libpq-dev \
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
libpq-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 复制并处理依赖文件(排除 Windows 专用包和需要编译的包)
|
||||
# 复制依赖文件(排除 Windows 专用包 win32_setctime)
|
||||
COPY requirements.txt .
|
||||
RUN grep -v -E '^(win32_setctime|psycopg2==)' requirements.txt > /tmp/requirements.txt \
|
||||
RUN grep -v '^win32_setctime' requirements.txt > /tmp/requirements.txt \
|
||||
&& pip install --no-cache-dir -r /tmp/requirements.txt \
|
||||
&& rm /tmp/requirements.txt requirements.txt
|
||||
&& pip install --no-cache-dir fastapi-cdn-host langchain-tavily langgraph-checkpoint-postgres
|
||||
Loading…
Reference in New Issue