Skip to content

Commit

Permalink
create a symlink to the missing library ddPn08#29
Browse files Browse the repository at this point in the history
  • Loading branch information
ddPn08 committed Feb 11, 2023
1 parent 220b7b3 commit c1dc547
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 35 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
- ./docker-data/models:/app/models
- ./docker-data/outputs:/app/outputs
environment:
- COMMANDLINE_ARGS=--skip-build-frontend
- COMMANDLINE_ARGS=
- UVICORN_ARGS=--host 0.0.0.0
deploy:
resources:
Expand Down
45 changes: 27 additions & 18 deletions docker/Dockerfile.full
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04 as tensorrt

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update && apt upgrade -y \
RUN apt update \
&& apt install software-properties-common -y \
&& add-apt-repository --yes ppa:deadsnakes/ppa

RUN apt update && apt install build-essential curl git-core tensorrt tensorrt-dev tensorrt-libs -y
RUN apt update && apt install build-essential curl git-core -y

RUN git clone https://github.com/NVIDIA/TensorRT /TensorRT && cd /TensorRT && git submodule update --init --recursive
RUN apt install tensorrt=8.5.3.1-1+cuda11.8 tensorrt-dev=8.5.3.1-1+cuda11.8 tensorrt-libs=8.5.3.1-1+cuda11.8 -y

RUN git clone https://github.com/NVIDIA/TensorRT /TensorRT \
&& cd /TensorRT \
&& git submodule update --init --recursive

WORKDIR /TensorRT

Expand All @@ -25,34 +29,39 @@ RUN mkdir -p build && cd build \
&& make -j$(nproc)


FROM node:18.14.0-alpine3.17 as frontend
FROM nvidia/cuda:11.8.0-runtime-ubuntu20.04 as main

RUN apk update && apk add git && npm i -g pnpm
ENV DEBIAN_FRONTEND=noninteractive

COPY . /Lsmith
RUN apt update \
&& apt install software-properties-common -y \
&& add-apt-repository ppa:deadsnakes/ppa -y \
&& apt install curl -y

WORKDIR /Lsmith/frontend
RUN apt install tensorrt=8.5.3.1-1+cuda11.8 -y

RUN pnpm i && pnpm build
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash

RUN apt install nodejs -y

FROM nvidia/cuda:11.8.0-runtime-ubuntu20.04 as main
RUN curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& chmod +x Miniconda3-latest-Linux-x86_64.sh \
&& bash ./Miniconda3-latest-Linux-x86_64.sh -b -f -p /opt/conda \
&& rm Miniconda3-latest-Linux-x86_64.sh \
&& /opt/conda/bin/conda init bash

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update && apt upgrade -y \
&& apt install software-properties-common -y \
&& add-apt-repository --yes ppa:deadsnakes/ppa
RUN npm i -g pnpm

RUN apt update && apt install curl python3.10 python3.10-venv git-core tensorrt=8.5.3.1-1+cuda11.8 -y
RUN cd /usr/local/cuda-11.8/targets/x86_64-linux/lib/ \
&& ln -s libcublas.so.11 libcublas.so.12 \
&& ln -s libcublasLt.so.11 libcublasLt.so.12

RUN curl https://bootstrap.pypa.io/get-pip.py | python3.10
ENV LD_LIBRARY_PATH /usr/local/cuda-11.8/targets/x86_64-linux/lib:$LD_LIBRARY_PATH

COPY . /app

WORKDIR /app

COPY --from=tensorrt /TensorRT/build/out/libnvinfer_plugin.so.8 /app/lib/trt/lib/libnvinfer_plugin.so
COPY --from=frontend /Lsmith/frontend/dist /app/dist

ENTRYPOINT [ "/usr/bin/python3.10", "-u", "/app/launch.py" ]
ENTRYPOINT [ "/opt/conda/bin/python", "-u", "/app/launch.py" ]
36 changes: 20 additions & 16 deletions docker/Dockerfile.lite
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
FROM node:18.14.0-alpine3.17 as frontend

RUN apk update && apk add git && npm i -g pnpm
FROM nvidia/cuda:11.8.0-runtime-ubuntu20.04 as main

COPY . /Lsmith
ENV DEBIAN_FRONTEND=noninteractive

WORKDIR /Lsmith/frontend
RUN apt update \
&& apt install software-properties-common -y \
&& add-apt-repository ppa:deadsnakes/ppa -y \
&& apt install curl -y

RUN pnpm i && pnpm build
RUN apt install tensorrt=8.5.3.1-1+cuda11.8 -y

RUN curl -sL https://deb.nodesource.com/setup_18.x | bash

FROM nvidia/cuda:11.8.0-runtime-ubuntu20.04 as main
RUN apt install nodejs -y

ENV DEBIAN_FRONTEND=noninteractive
RUN curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& chmod +x Miniconda3-latest-Linux-x86_64.sh \
&& bash ./Miniconda3-latest-Linux-x86_64.sh -b -f -p /opt/conda \
&& rm Miniconda3-latest-Linux-x86_64.sh \
&& /opt/conda/bin/conda init bash

RUN apt update && apt upgrade -y \
&& apt install software-properties-common -y \
&& add-apt-repository --yes ppa:deadsnakes/ppa
RUN npm i -g pnpm

RUN apt update && apt install curl python3.10 python3.10-venv git-core tensorrt=8.5.3.1-1+cuda11.8 -y
RUN cd /usr/local/cuda-11.8/targets/x86_64-linux/lib/ \
&& ln -s libcublas.so.11 libcublas.so.12 \
&& ln -s libcublasLt.so.11 libcublasLt.so.12

RUN curl https://bootstrap.pypa.io/get-pip.py | python3.10
ENV LD_LIBRARY_PATH /usr/local/cuda-11.8/targets/x86_64-linux/lib:$LD_LIBRARY_PATH

COPY . /app

WORKDIR /app

COPY --from=frontend /Lsmith/frontend/dist /app/dist

ENTRYPOINT [ "/usr/bin/python3.10", "-u", "/app/launch.py" ]
ENTRYPOINT [ "/opt/conda/bin/python", "-u", "/app/launch.py" ]

0 comments on commit c1dc547

Please sign in to comment.