Skip to content

Commit 8e522e8

Browse files
committed
Update sources list to use Aliyun mirrors
- Remove unnecessary empty line - Update sources list to use Aliyun mirrors - Retain existing installation steps
1 parent 7696255 commit 8e522e8

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

Dockerfile

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ ENV PYTHONUNBUFFERED=1 \
7979
ADD https://install.python-poetry.org /tmp/install-poetry.py
8080
RUN python /tmp/install-poetry.py
8181

82-
8382
RUN 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
130129
RUN --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
146132
FROM 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 && \
149136
RUN 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-
# 原有的安装步骤(保持不变)
157143
ENV LS_DIR=/label-studio \
158144
HOME=/label-studio \
159145
LABEL_STUDIO_BASE_DATA_DIR=/label-studio/data \

0 commit comments

Comments
 (0)