Add devcontainer to ease backend development

This commit is contained in:
Morgan Funtowicz 2024-06-28 14:39:19 +02:00
parent 91423771be
commit f3e729a6d6
2 changed files with 32 additions and 0 deletions

View File

@ -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"
]
}

View File

@ -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