@@ -79,7 +79,6 @@ ENV PYTHONUNBUFFERED=1 \
7979ADD https://install.python-poetry.org /tmp/install-poetry.py
8080RUN python /tmp/install-poetry.py
8181
82-
8382RUN sed -i 's#http://.*archive.ubuntu.com/#http://mirrors.aliyun.com/#' /etc/apt/sources.list && \
8483 --mount=type=cache,target="/var/cache/apt" ,sharing=locked \
8584 --mount=type=cache,target="/var/lib/apt/lists" ,sharing=locked \
@@ -130,30 +129,17 @@ ARG BRANCH_OVERRIDE
130129RUN --mount=type=bind,source=.git,target=./.git \
131130 VERSION_OVERRIDE=${VERSION_OVERRIDE} BRANCH_OVERRIDE=${BRANCH_OVERRIDE} poetry run python label_studio/core/version.py
132131
133- # ################################## Stage: prod
134- FROM python:${PYTHON_VERSION}-slim AS production
135-
136- ENV LS_DIR=/label-studio \
137- HOME=/label-studio \
138- LABEL_STUDIO_BASE_DATA_DIR=/label-studio/data \
139- OPT_DIR=/opt/heartex/instance-data/etc \
140- PATH="/label-studio/.venv/bin:$PATH" \
141- DJANGO_SETTINGS_MODULE=core.settings.label_studio \
142- PYTHONUNBUFFERED=1 \
143- PYTHONDONTWRITEBYTECODE=1
144-
145- WORKDIR $LS_DIR
146132FROM python:${PYTHON_VERSION}-slim AS production
147133
148- # 新增:替换 Debian 源为国内镜像(解决网络问题)
134+ # update sources list to use Aliyun mirrors
135+ RUN sed -i 's#http://.*archive.ubuntu.com/#http://mirrors.aliyun.com/#' /etc/apt/sources.list && \
149136RUN echo "deb http://mirrors.aliyun.com/debian/ bookworm main non-free contrib" > /etc/apt/sources.list && \
150137 echo "deb-src http://mirrors.aliyun.com/debian/ bookworm main non-free contrib" >> /etc/apt/sources.list && \
151138 echo "deb http://mirrors.aliyun.com/debian-security/ bookworm-security main" >> /etc/apt/sources.list && \
152139 echo "deb-src http://mirrors.aliyun.com/debian-security/ bookworm-security main" >> /etc/apt/sources.list && \
153140 echo "deb http://mirrors.aliyun.com/debian/ bookworm-updates main non-free contrib" >> /etc/apt/sources.list && \
154141 echo "deb-src http://mirrors.aliyun.com/debian/ bookworm-updates main non-free contrib" >> /etc/apt/sources.list
155142
156- # 原有的安装步骤(保持不变)
157143ENV LS_DIR=/label-studio \
158144 HOME=/label-studio \
159145 LABEL_STUDIO_BASE_DATA_DIR=/label-studio/data \
0 commit comments