From 9cc0df405c354ee9cbeb731f3f723e8c7d5e28c6 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Mon, 24 Nov 2025 07:38:34 +0800 Subject: [PATCH] Use system Python in Dockerfile instead of venv --- Dockerfile | 7 +++---- requirements.txt | 3 --- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index da532ca..49aeb6b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,10 +16,9 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins zip \ && rm -rf /var/lib/apt/lists/* ADD requirements.txt requirements.txt -RUN python3 -m venv /venv && \ - /venv/bin/pip install uv --index-url https://pypi.tuna.tsinghua.edu.cn/simple && \ - rm -f /usr/lib/python*/EXTERNALLY-MANAGED && \ - /venv/bin/uv pip install --system --no-cache -r requirements.txt --default-index https://pypi.tuna.tsinghua.edu.cn/simple +RUN rm -f /usr/lib/python*/EXTERNALLY-MANAGED && \ + pip3 install uv --index-url https://pypi.tuna.tsinghua.edu.cn/simple && \ + uv pip install --system --no-cache -r requirements.txt --default-index https://pypi.tuna.tsinghua.edu.cn/simple ADD scripts/download_models.py /tmp/download_models.py RUN HF_ENDPOINT=https://hf-mirror.com python3 /tmp/download_models.py && rm /tmp/download_models.py ADD api /emblem/api diff --git a/requirements.txt b/requirements.txt index d5acc0a..a31c158 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,3 @@ -Flask>=3.0.3,<4.0.0 -six>=1.16.0,<2.0.0 -aliyun-python-sdk-core-v3 oss2 django-cors-headers django-tastypie