Use system Python in Dockerfile instead of venv
This commit is contained in:
parent
7580a9a452
commit
9cc0df405c
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user