diff --git a/docker/Dockerfile b/docker/Dockerfile index 35937a71..f208c46c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -3,22 +3,31 @@ FROM nvidia/cuda:11.7.1-base-ubuntu22.04 AS base # 设置非交互式安装,避免 tzdata 等包的配置暂停 ENV DEBIAN_FRONTEND=noninteractive +COPY docker/mxcad_x86_64.zip /jmalcloud/ + # 安装 wget 和 tesseract,并配置时区和 locales RUN apt-get update && \ - apt-get install -y --no-install-recommends wget locales tesseract-ocr p7zip-full unrar libheif-examples && \ + apt-get install -y --no-install-recommends wget unzip locales tesseract-ocr p7zip-full unrar libheif-examples && \ locale-gen en_US.UTF-8 && \ update-locale LANG=en_US.UTF-8 && \ # 下载并安装 jellyfin-ffmpeg ARCH=$(dpkg --print-architecture) && \ wget https://repo.jellyfin.org/files/ffmpeg/ubuntu/latest-5.x/${ARCH}/jellyfin-ffmpeg5_5.1.4-3-jammy_${ARCH}.deb && \ dpkg -i jellyfin-ffmpeg5_5.1.4-3-jammy_${ARCH}.deb || apt-get install -fy && \ + # 安装 mxcad + unzip -o /jmalcloud/mxcad_x86_64.zip -d /usr/local/ && \ + rm -f /jmalcloud/mxcad_x86_64.zip && \ + rm -rf /usr/local/__MACOSX/ && \ + mv /usr/local/x86_64/ /usr/local/mxcad && \ + chmod -R 777 /usr/local/mxcad/mxcadassembly && \ + chmod -R 777 ./mx/so/* && \ + cp -r -f ./mx/locale /usr/local/share/locale && \ # 卸载 wget 并清理下载的文件和APT缓存 - rm -f jellyfin-ffmpeg5_5.1.4-3-jammy_${ARCH}.deb && \ - apt-get remove -y wget && \ + apt-get remove -y wget unzip && \ apt-get clean && \ + rm -f jellyfin-ffmpeg5_5.1.4-3-jammy_${ARCH}.deb && \ rm -rf /var/lib/apt/lists/* - # 将/usr/lib/jellyfin-ffmpeg添加到PATH ENV PATH=/usr/lib/jellyfin-ffmpeg:$PATH @@ -41,12 +50,11 @@ RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN mkdir -p /jmalcloud/files /jmalcloud/tess4j/datapath -ADD docker/ip2region.xdb /jmalcloud/ - -ADD tess4j/datapath/chi_sim.traineddata /jmalcloud/tess4j/datapath/ +COPY docker/ip2region.xdb /jmalcloud/ -ADD target/lib /usr/local/clouddisk-lib +COPY tess4j/datapath/chi_sim.traineddata /jmalcloud/tess4j/datapath/ +COPY target/lib /usr/local/clouddisk-lib # 更新 PATH 和 LD_LIBRARY_PATH ENV PATH="/opt/java/openjdk/bin:${PATH}"