Skip to content

nets-cs-pub-ro/uccl-upb-internal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Building uccl in Apptainer

  1. Build the image
apptainer build --fakeroot uccl.sif uccl.def
  1. Adjust the build.sh to not use docker anymore. Diff below on what to remove
--- a/build.sh
+++ b/build.sh
@@ -243,31 +243,8 @@ BUILD_ARGS="--build-arg PY_VER=${PY_VER}"
 if [[ -n "${BASE_IMAGE:-}" ]]; then
   BUILD_ARGS+=" --build-arg BASE_IMAGE=${BASE_IMAGE}"
 fi
-if [[ "$ARCH" == "aarch64" ]]; then
-  docker build --platform=linux/arm64 $BUILD_ARGS -t "$IMAGE_NAME" -f "$DOCKERFILE" .
-else
-  docker build $BUILD_ARGS -t "$IMAGE_NAME" -f "$DOCKERFILE" .
-fi
 
 echo "[2/3] Running build inside container..."
-docker run --rm --user "$(id -u):$(id -g)" \
-  -v /etc/passwd:/etc/passwd:ro \
-  -v /etc/group:/etc/group:ro \
-  -v $HOME:$HOME \
-  -v "$(pwd)":/io \
-  -e TARGET="${TARGET}" \
-  -e PY_VER="${PY_VER}" \
-  -e ARCH="${ARCH}" \
-  -e ROCM_IDX_URL="${ROCM_IDX_URL}" \
-  -e IS_EFA="${IS_EFA}" \
-  -e WHEEL_DIR="${WHEEL_DIR}" \
-  -e BUILD_TYPE="${BUILD_TYPE}" \
-  -e USE_TCPX="${USE_TCPX:-0}" \
-  -e MAKE_NORMAL_MODE="${MAKE_NORMAL_MODE:-}" \
-  -e FUNCTION_DEF="$(declare -f build_rccl_nccl_h build_rdma build_efa build_p2p build_ep build_eccl)" \
-  -w /io \
-  "$IMAGE_NAME" /bin/bash -c '
-    set -euo pipefail
 
     if [[ "$TARGET" == "therock" ]]; then
 
@@ -374,8 +351,7 @@ def initialize():
     fi
     
     auditwheel show /io/${WHEEL_DIR}/*.whl
-  '
  1. Retrieve a shell in the apptainer
apptainer shell --fakeroot --writable-tmpfs --bind ./wheelhouse-cuda:/io/wheelhouse-cuda   --nv uccl.sif
  1. Run ./build.sh cuda rdma

Check all the options of build.sh from the main uccl docs, there are options as as p2p and more in place of rdma.

  1. You'll see an error, but that's all right. You still have the wheel and we'll install it now.
python3 -m pip install /io/wheelhouse-cuda/uccl-0.0.1.post4-py3-none-manylinux_2_35_x86_64.whl
  1. You can now use uccl
> python3
> import uccl

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published