sbt-idp/cope2n-ai-fi/Dockerfile

38 lines
2.0 KiB
Docker
Raw Permalink Normal View History

2023-12-26 03:39:03 +00:00
FROM pytorch/pytorch:1.13.1-cuda11.6-cudnn8-runtime
2023-11-30 11:22:16 +00:00
2023-12-26 03:39:03 +00:00
RUN apt-get update && \
2024-05-03 01:45:28 +00:00
apt-get install -y git gcc g++ ffmpeg libsm6 libxext6 wget && \
2023-12-26 03:39:03 +00:00
apt-get -y autoremove && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
2023-11-30 11:22:16 +00:00
2023-12-26 03:39:03 +00:00
# RUN pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116 --no-cache-dir
2023-11-30 11:22:16 +00:00
2023-12-26 03:39:03 +00:00
RUN pip install -U openmim==0.3.7 --no-cache-dir
RUN mim install mmcv-full==1.7.1
RUN pip install mmcv==1.6.0 -f https://download.openmmlab.com/mmcv/dst/cu116/torch1.13/index.html --no-cache-dir
RUN ln -s /opt/conda/lib/python3.10/site-packages/torch/lib/libcudnn.so.8 /usr/lib/libcudnn.so && \
ln -s /opt/conda/lib/libcublas.so /usr/lib/libcublas.so
2024-05-03 01:45:28 +00:00
# RUN pip install fastdeploy-gpu-python==1.0.7 -f https://www.paddlepaddle.org.cn/whl/fastdeploy.html --no-cache-dir
2024-10-29 05:15:24 +00:00
COPY fastdeploy_gpu_python-1.0.7-cp310-cp310-manylinux1_x86_64.whl .
RUN pip install fastdeploy_gpu_python-1.0.7-cp310-cp310-manylinux1_x86_64.whl --no-cache-dir
RUN rm fastdeploy_gpu_python-1.0.7-cp310-cp310-manylinux1_x86_64.whl
2024-02-26 05:39:22 +00:00
2024-05-03 01:45:28 +00:00
RUN python -m pip install 'git+https://github.com/facebookresearch/detectron2.git@a59f05630a8f205756064244bf5beb8661f96180' --no-cache-dir
2024-10-29 05:15:24 +00:00
COPY ./modules /workspace/modules
RUN cd /workspace/modules/sdsvkvu/sdsvkvu/externals/sdsvocr/sdsvocr/externals/sdsv_dewarp && pip3 install -v -e . --no-cache-dir
RUN cd /workspace/modules/sdsvkvu/sdsvkvu/externals/sdsvocr/sdsvocr/externals/sdsvtd && pip3 install -v -e . --no-cache-dir
RUN cd /workspace/modules/sdsvkvu/sdsvkvu/externals/sdsvocr/sdsvocr/externals/sdsvtr && pip3 install -v -e . --no-cache-dir
RUN cd /workspace/modules/sdsvkvu/sdsvkvu/externals/sdsvocr && pip3 install -v -e . --no-cache-dir
RUN cd /workspace/modules/sdsvkvu && pip3 install -v -e . --no-cache-dir
2023-12-26 03:39:03 +00:00
# Install SDSV packages
2023-12-14 07:23:18 +00:00
COPY . /workspace/cope2n-ai-fi
2023-12-26 03:39:03 +00:00
RUN cd /workspace/cope2n-ai-fi && pip3 install -r requirements.txt --no-cache-dir
2023-11-30 11:22:16 +00:00
2023-12-26 03:39:03 +00:00
WORKDIR /workspace
2023-11-30 11:22:16 +00:00
ENV PYTHONPATH="."
2023-12-13 09:01:31 +00:00
ENV TZ="Asia/Ho_Chi_Minh"
2023-11-30 11:22:16 +00:00
2024-10-29 07:41:35 +00:00
CMD [ "sh", "run.sh"]