未验证 提交 a3534979 编写于 作者: R Roman Donchenko 提交者: GitHub

Stop adding package source code into the release Docker images (#6040)

The policy that mandated this is no longer relevant now that CVAT is no
longer developed by Intel. Moreover, the source code included was not
even complete (it didn't contain Python or NPM packages).

This saves ~1.6 GB in the unpacked image (and probably a bunch of build
time too, but I didn't measure it).
上级 b8cdd4ef
......@@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v3
- name: Build images
run: |
CVAT_VERSION=latest CLAM_AV=yes INSTALL_SOURCES=yes docker compose -f docker-compose.yml -f docker-compose.dev.yml build
CVAT_VERSION=latest CLAM_AV=yes docker compose -f docker-compose.yml -f docker-compose.dev.yml build
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
......
......@@ -10,7 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- TDB
### Changed
- TDB
- Docker images no longer include Ubuntu package sources or FFmpeg/OpenH264 sources
(<https://github.com/opencv/cvat/pull/6040>)
### Deprecated
- TDB
......
......@@ -30,8 +30,8 @@ ENV FFMPEG_VERSION=4.3.1 \
OPENH264_VERSION=2.1.1
WORKDIR /tmp/openh264
RUN curl -sL https://github.com/cisco/openh264/archive/v${OPENH264_VERSION}.tar.gz --output openh264-${OPENH264_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f openh264-${OPENH264_VERSION}.tar.gz && \
RUN curl -sL https://github.com/cisco/openh264/archive/v${OPENH264_VERSION}.tar.gz --output - | \
tar -zx --strip-components=1 && \
make -j5 && make install-shared PREFIX=${PREFIX} && make clean
WORKDIR /tmp/ffmpeg
......@@ -39,9 +39,7 @@ RUN curl -sL https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 --outp
tar -jx --strip-components=1 && \
./configure --disable-nonfree --disable-gpl --enable-libopenh264 \
--enable-shared --disable-static --disable-doc --disable-programs --prefix="${PREFIX}" && \
# make clean keeps the configuration files that let to know how the original sources were used to create the binary
make -j5 && make install && make clean && \
tar -zcf "/tmp/ffmpeg-$FFMPEG_VERSION.tar.gz" . && mv "/tmp/ffmpeg-$FFMPEG_VERSION.tar.gz" .
make -j5 && make install && make clean
# Build wheels for all dependencies
ARG PIP_VERSION
......@@ -132,23 +130,6 @@ RUN if [ "$CLAM_AV" = "yes" ]; then \
rm -rf /var/lib/apt/lists/*; \
fi
ARG INSTALL_SOURCES='no'
WORKDIR ${HOME}/sources
RUN if [ "$INSTALL_SOURCES" = "yes" ]; then \
sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list && \
apt-get update && \
dpkg --get-selections | while read -r line; do \
package=$(echo "$line" | awk '{print $1}'); \
mkdir "$package"; \
( \
cd "$package"; \
apt-get -q --download-only source "$package"; \
) \
done && \
rm -rf /var/lib/apt/lists/*; \
fi
COPY --from=build-image /tmp/openh264/openh264*.tar.gz /tmp/ffmpeg/ffmpeg*.tar.gz ${HOME}/sources/
# Install wheels from the build image
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:${PATH}"
......
......@@ -18,7 +18,6 @@ services:
https_proxy:
socks_proxy:
CLAM_AV:
INSTALL_SOURCES:
CVAT_DEBUG_ENABLED:
environment:
CVAT_DEBUG_ENABLED: '${CVAT_DEBUG_ENABLED:-no}'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册