FROM ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/fastdeploy-cuda-12.6:2.2.0
ARG PADDLE_VERSION=3.2.0
ARG FD_VERSION=2.2.0

ENV DEBIAN_FRONTEND=noninteractive

WORKDIR /workspace

RUN echo "ulimit -u unlimited" >> /root/.bashrc
RUN echo "ulimit -n 65536" >> /root/.bashrc

# uninstall existing package
RUN python -m pip uninstall paddlepaddle-gpu fastdeploy-gpu -y

# install paddlepaddle
RUN python -m pip install --no-cache-dir paddlepaddle-gpu==${PADDLE_VERSION} -i https://www.paddlepaddle.org.cn/packages/stable/cu126/

# build and install FastDeploy
RUN python -m pip install --no-cache-dir  fastdeploy-gpu==${FD_VERSION} -i https://www.paddlepaddle.org.cn/packages/stable/fastdeploy-gpu-80_90/ --extra-index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple

ENV http_proxy=""
ENV https_proxy=""
ENV no_proxy=""
