mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-26 04:22:08 +00:00
Add devcontainer to ease backend development
This commit is contained in:
parent
91423771be
commit
f3e729a6d6
15
.devcontainer/devcontainer.json
Normal file
15
.devcontainer/devcontainer.json
Normal 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"
|
||||
]
|
||||
}
|
17
.devcontainer/install-dev-tools.sh
Normal file
17
.devcontainer/install-dev-tools.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user