Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
yinfan98 committed Dec 6, 2023
1 parent 904bee1 commit 7ab4bed
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions docker/Jetson/Jetpack4.6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ENV NVIDIA_VISIBLE_DEVICE all
ENV NVIDIA_DRIVER_CAPABILITIES all
ENV CUDA_HOME="/usr/local/cuda"
ENV PATH="/usr/local/cuda/bin:${PATH}"
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/lib/python3.6/site-packages/opencv-python.libs/${LD_LIBRARY_PATH}"
ENV TENSORRT_DIR="/usr/include/aarch64-linux-gnu"

ENV DEBIAN_FRONTEND=nointeractive
Expand All @@ -19,40 +19,42 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 42D5A192B819C5DA &
apt-get update &&\
apt-get install -y vim wget libspdlog-dev libssl-dev libpng-dev pkg-config libhdf5-100 libhdf5-dev --no-install-recommends

RUN python3 -m pip install --upgrade pip
# install onnx
RUN python3 -m pip install onnx==1.10 versioned-hdf5
RUN python3 -m pip install --upgrade pip &&\
python3 -m pip install onnx==1.10 versioned-hdf5

# install onnxruntime
COPY onnxruntime_gpu-1.10.0-cp36-cp36m-linux_aarch64.whl /root/workspace
# RUN wget https://nvidia.box.com/shared/static/jy7nqva7l88mq9i8bw3g3sklzf4kcnn2.whl -O onnxruntime_gpu-1.10.0-cp36-cp36m-linux_aarch64.whl &&\
RUN python3 -m pip install --no-cache-dir onnxruntime_gpu-1.10.0-cp36-cp36m-linux_aarch64.whl
RUN wget https://nvidia.box.com/shared/static/jy7nqva7l88mq9i8bw3g3sklzf4kcnn2.whl -O onnxruntime_gpu-1.10.0-cp36-cp36m-linux_aarch64.whl &&\
python3 -m pip install --no-cache-dir onnxruntime_gpu-1.10.0-cp36-cp36m-linux_aarch64.whl

# install mmcv
RUN git clone --branch 2.x https://github.com/open-mmlab/mmcv.git
WORKDIR /root/workspace/mmcv
RUN python3 -m pip install --no-cache-dir opencv-python==4.5.4.60
RUN MMCV_WITH_OPS=1 python3 -m pip install -e .
RUN cd mmcv &&\
python3 -m pip install --no-cache-dir opencv-python==4.5.4.60 &&\
MMCV_WITH_OPS=1 python3 -m pip install -e .

# build ppl.cv
COPY ppl.cv /root/workspace/ppl.cv
WORKDIR /root/workspace/ppl.cv
RUN echo "export PPLCV_DIR=/root/workspace/ppl.cv" >> ~/.bashrc
RUN ./build.sh cuda
RUN git clone https://github.com/openppl-public/ppl.cv.git &&\
echo "export PPLCV_DIR=/root/workspace/ppl.cv" >> ~/.bashrc &&\
cd ppl.cv &&\
./build.sh cuda

# build mmdeploy
COPY mmdeploy /root/workspace/mmdeploy
# RUN git clone --recursive -b $MMDEPLOY_VERSION --depth 1 https://github.com/open-mmlab/mmdeploy &&\
# download mmdeploy
RUN git clone --recursive -b $MMDEPLOY_VERSION --depth 1 https://github.com/open-mmlab/mmdeploy

# build TRT custom op
WORKDIR /root/workspace/mmdeploy
RUN mkdir -p build && cd build &&\
RUN cd mmdeploy &&\
mkdir -p build && cd build &&\
cmake .. \
-DMMDEPLOY_TARGET_BACKENDS="trt" \
-DTENSORRT_DIR=TENSORRT_DIR &&\
make -j$(nproc) && make install
RUN python3 -m pip install --upgrade setuptools && python3 -m pip install -e .
RUN cd mmdeploy &&\
python3 -m pip install --upgrade setuptools &&\
python3 -m pip install -e .

# build mmdeploy
RUN mkdir -p build && cd build &&\
RUN cd mmdeploy &&\
mkdir -p build && cd build &&\
cmake .. \
-DMMDEPLOY_BUILD_SDK=ON \
-DMMDEPLOY_BUILD_SDK_PYTHON_API=ON \
Expand Down

0 comments on commit 7ab4bed

Please sign in to comment.