Skip to content

Commit

Permalink
chore: 更新基础镜像包加入mxcad程序
Browse files Browse the repository at this point in the history
  • Loading branch information
jamebal committed Aug 2, 2024
1 parent 2bc252a commit 1f38bdf
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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}"
Expand Down

0 comments on commit 1f38bdf

Please sign in to comment.