diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..2f33406c --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,15 @@ +{ + "name": "tgi-trtllm-backend", + "image": "nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04", + "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", + }, + "updateContentCommand": "bash .devcontainer/install-dev-tools.sh", + "postCreateCommand": [ + "nvidia-smi" + ] +} \ No newline at end of file diff --git a/.devcontainer/install-dev-tools.sh b/.devcontainer/install-dev-tools.sh new file mode 100644 index 00000000..bde5828c --- /dev/null +++ b/.devcontainer/install-dev-tools.sh @@ -0,0 +1,17 @@ +# update system +apt-get update +apt-get upgrade -y + +# install Linux tools and Python 3 +apt-get install software-properties-common wget curl clang cmake git libopenmpi-dev libssl-dev \ + python3-dev python3-pip python3-wheel python3-setuptools -y + +# install Python packages +python3 -m pip install --upgrade pip + +# Install Rust +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +. "$HOME/.cargo/env" + +# Install TensorRT +curl --proto '=https' --tlsv1.2 -sSf https://github.com/NVIDIA/TensorRT-LLM/blob/main/docker/common/install_tensorrt.sh | sh \ No newline at end of file