fix:优化安装源
This commit is contained in:
20
Dockerfile
20
Dockerfile
@@ -26,7 +26,25 @@ COPY --from=build /app/dist ./dist
|
||||
COPY --from=build /app/public ./public
|
||||
|
||||
COPY backend/requirements.txt ./backend/requirements.txt
|
||||
RUN pip3 install --no-cache-dir --break-system-packages -r backend/requirements.txt
|
||||
ARG PIP_INDEX="https://pypi.tuna.tsinghua.edu.cn/simple"
|
||||
ARG PIP_TRUSTED_HOST="pypi.tuna.tsinghua.edu.cn"
|
||||
RUN pip3 install --no-cache-dir --break-system-packages \
|
||||
-i "${PIP_INDEX}" --trusted-host "${PIP_TRUSTED_HOST}" \
|
||||
fastapi==0.115.0 && \
|
||||
pip3 install --no-cache-dir --break-system-packages \
|
||||
-i "${PIP_INDEX}" --trusted-host "${PIP_TRUSTED_HOST}" \
|
||||
"uvicorn[standard]==0.30.0" && \
|
||||
pip3 install --no-cache-dir --break-system-packages \
|
||||
-i "${PIP_INDEX}" --trusted-host "${PIP_TRUSTED_HOST}" \
|
||||
httpx==0.27.0 && \
|
||||
pip3 install --no-cache-dir --break-system-packages \
|
||||
-i "${PIP_INDEX}" --trusted-host "${PIP_TRUSTED_HOST}" \
|
||||
"websockets>=12.0" && \
|
||||
pip3 install --no-cache-dir --break-system-packages \
|
||||
-i "${PIP_INDEX}" --trusted-host "${PIP_TRUSTED_HOST}" \
|
||||
"openai>=1.0.0" && \
|
||||
pip3 check && \
|
||||
python3 -c "import fastapi; import uvicorn; import httpx; import websockets; import openai; print('all deps ok')"
|
||||
|
||||
COPY backend ./backend
|
||||
COPY .env.example ./
|
||||
|
||||
Reference in New Issue
Block a user