From eb6698f1ed85f98911cf9ffd55f0306bbc37414f Mon Sep 17 00:00:00 2001 From: Hugo Larcher Date: Mon, 2 Dec 2024 16:23:02 +0100 Subject: [PATCH] chore: fix dev containers --- .devcontainer/Dockerfile.trtllm | 5 ++- .devcontainer/devcontainer.json | 7 ---- .devcontainer/reinstall-cmake.sh | 59 -------------------------------- 3 files changed, 4 insertions(+), 67 deletions(-) delete mode 100644 .devcontainer/reinstall-cmake.sh diff --git a/.devcontainer/Dockerfile.trtllm b/.devcontainer/Dockerfile.trtllm index abe81450..4cf85388 100644 --- a/.devcontainer/Dockerfile.trtllm +++ b/.devcontainer/Dockerfile.trtllm @@ -67,4 +67,7 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y && chmod -R a+w /root/.cargo ENV PATH="/root/.cargo/bin:$PATH" -RUN cargo install cargo-chef \ No newline at end of file +RUN cargo install cargo-chef + +COPY --from=trt-builder /usr/local/tensorrt /usr/local/tensorrt +COPY --from=mpi-builder /usr/local/mpi /usr/local/mpi \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f0b9de32..5a2f347d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,18 +6,11 @@ "build": { "dockerfile": "Dockerfile.trtllm" }, -// "runArgs": [ -// "--gpus=all" -// ], "remoteEnv": { "PATH": "${containerEnv:PATH}:/usr/local/cuda/bin", "LD_LIBRARY_PATH": "$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64", "XLA_FLAGS": "--xla_gpu_cuda_data_dir=/usr/local/cuda" }, - "updateContentCommand": "bash .devcontainer/install-dev-tools.sh", -// "postCreateCommand": [ -// "nvidia-smi" -// ], "customizations" : { "jetbrains" : { "backend" : "CLion" diff --git a/.devcontainer/reinstall-cmake.sh b/.devcontainer/reinstall-cmake.sh deleted file mode 100644 index 408b81d2..00000000 --- a/.devcontainer/reinstall-cmake.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env bash -#------------------------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. -#------------------------------------------------------------------------------------------------------------- -# -set -e - -CMAKE_VERSION=${1:-"none"} - -if [ "${CMAKE_VERSION}" = "none" ]; then - echo "No CMake version specified, skipping CMake reinstallation" - exit 0 -fi - -# Cleanup temporary directory and associated files when exiting the script. -cleanup() { - EXIT_CODE=$? - set +e - if [[ -n "${TMP_DIR}" ]]; then - echo "Executing cleanup of tmp files" - rm -Rf "${TMP_DIR}" - fi - exit $EXIT_CODE -} -trap cleanup EXIT - - -echo "Installing CMake..." -apt-get -y purge --auto-remove cmake -mkdir -p /opt/cmake - -architecture=$(dpkg --print-architecture) -case "${architecture}" in - arm64) - ARCH=aarch64 ;; - amd64) - ARCH=x86_64 ;; - *) - echo "Unsupported architecture ${architecture}." - exit 1 - ;; -esac - -CMAKE_BINARY_NAME="cmake-${CMAKE_VERSION}-linux-${ARCH}.sh" -CMAKE_CHECKSUM_NAME="cmake-${CMAKE_VERSION}-SHA-256.txt" -TMP_DIR=$(mktemp -d -t cmake-XXXXXXXXXX) - -echo "${TMP_DIR}" -cd "${TMP_DIR}" - -curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_BINARY_NAME}" -O -curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_CHECKSUM_NAME}" -O - -sha256sum -c --ignore-missing "${CMAKE_CHECKSUM_NAME}" -sh "${TMP_DIR}/${CMAKE_BINARY_NAME}" --prefix=/opt/cmake --skip-license - -ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake -ln -s /opt/cmake/bin/ctest /usr/local/bin/ctest