#!/bin/bash

set -e

. ./venv/bin/activate

pip install torch==2.1.0 --index-url https://download.pytorch.org/whl/cu121

curl -L https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/secure/8.6.1/tars/TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-12.0.tar.gz \
  | tar -xz

ln -sf ./TensorRT-* ./tensorrt
pip install ./tensorrt/python/tensorrt-*-cp311-*.whl
rm -rf ./tensorrt/{python,samples,data,lib/*.a,lib/libnvinfer_builder_resource.*}

pip install \
  numpy==1.25.0 \
  ply==3.11 \
  bottle==0.12.25 \
  transformers==4.31.0 \
  redis==4.5.5 \
  fire==0.5.0 \
  boto3==1.28.38 \

pip cache purge
