Skip to content

Commit

Permalink
Refactor Dockerfile: update the mirror to Aliyun and fix RDMA configu…
Browse files Browse the repository at this point in the history
…rations.

Signed-off-by: Ye Cao <[email protected]>
  • Loading branch information
dashanji committed Aug 8, 2024
1 parent f5721bb commit 0824e8a
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 20 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,7 @@ if(BUILD_VINEYARD_PYTHON_BINDINGS)
DEPENDS _C vineyard_internal_registry
COMMENT "Copying python extensions."
VERBATIM)
set_target_properties(_C PROPERTIES LINK_FLAGS "-Wl,--version-script=${LIBFABRIC_VERSION_SCRIPT}")
endif()

if(BUILD_VINEYARD_PYTHON_BINDINGS AND BUILD_VINEYARD_LLM_CACHE)
Expand Down
9 changes: 6 additions & 3 deletions docker/Dockerfile.vineyard-python-dev
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

# build vineyard-python-dev
FROM ghcr.io/v6d-io/v6d/vineyard-manylinux2014:20240329 as wheel
FROM ghcr.io/v6d-io/v6d/vineyard-manylinux2014:20240803 as wheel

ENV python=cp310-cp310

Expand Down Expand Up @@ -47,8 +47,11 @@ COPY python/vineyard.cc /work/v6d/python/vineyard.cc
COPY python/vineyard/llm /work/v6d/python/vineyard/llm

RUN cd /work/v6d && \
mkdir build && \
cd build && \
rm -rf /work/v6d/build && \
cd /work/v6d/thirdparty/libfabric && \
rm -f /work/v6d/thirdparty/libfabric/Makefile && \
mkdir -p /work/v6d/build && \
cd /work/v6d/build && \
export PATH=$PATH:/opt/python/$python/bin && \
pip3 install -U pip setuptools wheel && \
cmake .. -DBUILD_SHARED_LIBS=OFF \
Expand Down
6 changes: 5 additions & 1 deletion docker/Dockerfile.vineyardd
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ RUN cd /tmp && \
cd /tmp && \
rm -rf libunwind-1.7.2.tar.gz libunwind-1.7.2/

RUN cd /work/v6d && \
RUN export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH && \
cd /work/v6d && \
rm -rf /work/v6d/build && \
cd /work/v6d/thirdparty/libfabric && \
rm -f /work/v6d/thirdparty/libfabric/Makefile && \
mkdir -p /work/v6d/build && \
cd /work/v6d/build && \
cmake .. -DCMAKE_BUILD_TYPE=Release \
Expand Down
8 changes: 5 additions & 3 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ALPINE_TAG := $(ALPINE_MANIFEST_TAG)_$(PLATFORM)

WHEEL_BUILDER_REGISTRY := $(REGISTRY)
WHEEL_BUILDER_IMAGE := vineyard-manylinux2014
WHEEL_BUILDER_MANIFEST_TAG := 20240329
WHEEL_BUILDER_MANIFEST_TAG := 20240803
WHEEL_BUILDER_TAG := $(WHEEL_BUILDER_MANIFEST_TAG)_$(PLATFORM)

WHEEL_PYTHON := cp311-cp311
Expand Down Expand Up @@ -116,10 +116,12 @@ build-dev:

# build python-dev image
build-python-dev:
docker build ../ \
docker buildx build ../ \
--progress=$(BUILD_PROGRESS) \
-f ./Dockerfile.vineyard-python-dev \
-t $(PYTHON_DEV_REGISTRY)/$(PYTHON_DEV_IMAGE):$(PYTHON_DEV_TAG)
-t $(PYTHON_DEV_REGISTRY)/$(PYTHON_DEV_IMAGE):$(PYTHON_DEV_TAG) \
--load \
--platform linux/$(ARCH)
.PHONY: build-python-dev

# build vineyard-fluid-fuse image
Expand Down
11 changes: 10 additions & 1 deletion docker/pypa/Dockerfile.manylinux1
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,21 @@
# limitations under the License.

ARG PLATFORM=x86_64
FROM quay.io/pypa/manylinux2014_$PLATFORM:2024-03-25-9206bd9
FROM quay.io/pypa/manylinux2014_$PLATFORM:2024-08-03-32dfa47

# re-declare after FROM, reusing the default value
ARG PLATFORM
ENV PLATFORM $PLATFORM

RUN mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup && \
if [ "${PLATFORM}" = "x86_64" ]; then \
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo; \
elif [ "${PLATFORM}" = "aarch64" ]; then \
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-altarch-7.repo; \
fi && \
yum -y update && \
yum -y install devtoolset-10-libatomic-devel libtool

# target: ghcr.io/v6d-io/v6d/vineyard-manylinux2014:20240218_$PLATFORM

# Not sure why bundled cmake(3.28.0) in pipx doesn't work
Expand Down
34 changes: 22 additions & 12 deletions docker/vineyardd/Dockerfile.alpine-builder
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,24 @@ RUN echo "multilib_policy=best" >> /etc/yum.conf && \
echo "skip_missing_names_on_install=False" >> /etc/yum.conf \
sed -i '/^override_install_langs=/d' /etc/yum.conf \
echo "exclude = d36uatko69830t.cloudfront.net" >> /etc/yum/pluginconf.d/fastestmirror.conf \
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
yum-config-manager --enable extras && \
yum -y update && \
yum -y install yum-utils autoconf automake curl centos-release-scl-rh m4 make wget && \
yum -y install devtoolset-10-binutils devtoolset-10-gcc devtoolset-10-gcc-c++ && \
localedef -i en_US -f UTF-8 en_US.UTF-8 && \
yum clean all && \
rm -rf /var/cache/yum
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup && \
if [ "${PLATFORM}" = "x86_64" ]; then \
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo; \
elif [ "${PLATFORM}" = "aarch64" ]; then \
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-altarch-7.repo; \
fi && \
yum-config-manager --enable extras && \
yum -y update && \
yum -y install yum-utils autoconf automake curl centos-release-scl-rh m4 make wget && \
# for centos-scl-rh
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-SCLo-* && \
if [ "${PLATFORM}" = "x86_64" ]; then \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://mirrors.aliyun.com|g' /etc/yum.repos.d/CentOS-SCLo-*; \
elif [ "${PLATFORM}" = "aarch64" ]; then \
sed -i 's|#baseurl=http://mirror.centos.org/centos|baseurl=http://mirrors.aliyun.com/centos-altarch|g' /etc/yum.repos.d/CentOS-SCLo-*; \
fi && \
yum -y install devtoolset-10-binutils devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-libatomic-devel libtool && \
localedef -i en_US -f UTF-8 en_US.UTF-8

ENV BASH_ENV=/opt/rh/devtoolset-10/enable
ENV ENV=/opt/rh/devtoolset-10/enable
Expand Down Expand Up @@ -164,17 +174,17 @@ RUN cd /tmp && \
#
# note: remove shared libs
RUN cd /tmp && \
wget -q https://zlib.net/zlib-1.2.13.tar.gz && \
tar zxf zlib-1.2.13.tar.gz && \
cd zlib-1.2.13 && \
wget -q https://zlib.net/zlib-1.3.1.tar.gz && \
tar zxf zlib-1.3.1.tar.gz && \
cd zlib-1.3.1 && \
mkdir build && \
cd build && \
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel \
-DBUILD_SHARED_LIBS=OFF && \
make install -j`nproc` && \
rm -rf /usr/local/lib/libz.so* && \
cd /tmp && \
rm -rf zlib-1.2.13.tar.gz zlib-1.2.13
rm -rf zlib-1.3.1.tar.gz zlib-1.3.1

# install openssl: boringssl doesn't bring headers when installing
RUN cd /tmp && \
Expand Down

0 comments on commit 0824e8a

Please sign in to comment.