41 lines
2.1 KiB
Docker
Executable File
41 lines
2.1 KiB
Docker
Executable File
FROM thucpd2408/env-deskew
|
|
|
|
COPY ./packages/cudnn-linux*.tar.xz /tmp/cudnn-linux*.tar.xz
|
|
|
|
RUN tar -xvf /tmp/cudnn-linux*.tar.xz -C /tmp/ \
|
|
&& cp /tmp/cudnn-*-archive/include/cudnn*.h /usr/local/cuda/include \
|
|
&& cp -P /tmp/cudnn-*-archive/lib/libcudnn* /usr/local/cuda/lib64 \
|
|
&& chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn* \
|
|
&& rm -rf /tmp/cudnn-*-archive
|
|
|
|
RUN apt-get update && apt-get install -y gcc g++ ffmpeg libsm6 libxext6 poppler-utils
|
|
|
|
WORKDIR /workspace
|
|
|
|
|
|
COPY ./modules/ocr_engine/externals/ /workspace/cope2n-ai-fi/modules/ocr_engine/externals/
|
|
COPY ./modules/ocr_engine/requirements.txt /workspace/cope2n-ai-fi/modules/ocr_engine/requirements.txt
|
|
COPY ./modules/sdsvkie/ /workspace/cope2n-ai-fi/modules/sdsvkie/
|
|
COPY ./modules/sdsvkvu/ /workspace/cope2n-ai-fi/modules/sdsvkvu/
|
|
COPY ./requirements.txt /workspace/cope2n-ai-fi/requirements.txt
|
|
|
|
RUN cd /workspace/cope2n-ai-fi/modules/ocr_engine/externals/sdsv_dewarp && pip3 install -v -e .
|
|
RUN cd /workspace/cope2n-ai-fi/modules/ocr_engine/externals/sdsvtd && pip3 install -v -e .
|
|
RUN cd /workspace/cope2n-ai-fi/modules/ocr_engine/externals/sdsvtr && pip3 install -v -e .
|
|
|
|
RUN cd /workspace/cope2n-ai-fi/modules/sdsvkie && pip3 install -v -e .
|
|
RUN cd /workspace/cope2n-ai-fi/modules/sdsvkvu && pip3 install -v -e .
|
|
RUN cd /workspace/cope2n-ai-fi && pip3 install -r requirements.txt
|
|
|
|
RUN rm -f /usr/local/lib/python3.10/dist-packages/nvidia/cublas/lib/libcublasLt.so.11 && \
|
|
rm -f /usr/local/lib/python3.10/dist-packages/nvidia/cublas/lib/libcublas.so.11 && \
|
|
rm -f /usr/local/lib/python3.10/dist-packages/nvidia/cublas/lib/libnvblas.so.11 && \
|
|
ln -s /usr/local/cuda-11.8/targets/x86_64-linux/lib/libcublasLt.so.11 /usr/local/lib/python3.10/dist-packages/nvidia/cublas/lib/libcublasLt.so.11 && \
|
|
ln -s /usr/local/cuda-11.8/targets/x86_64-linux/lib/libcublas.so.11 /usr/local/lib/python3.10/dist-packages/nvidia/cublas/lib/libcublas.so.11 && \
|
|
ln -s /usr/local/cuda-11.8/targets/x86_64-linux/lib/libnvblas.so.11 /usr/local/lib/python3.10/dist-packages/nvidia/cublas/lib/libnvblas.so.11
|
|
|
|
ENV PYTHONPATH="."
|
|
ENV TZ="Asia/Ho_Chi_Minh"
|
|
|
|
CMD [ "sh", "run.sh"]
|