fix(dwg): correct ODA download URL + dynamic binary path lookup
- Use www.opendesign.com/guestfiles/get URL (no auth required) - Auto-find and symlink ODA binary after dpkg install - app.py searches multiple common install paths Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
FROM ubuntu:24.04
|
||||
|
||||
# ODA File Converter needs Qt libs + virtual framebuffer for headless mode
|
||||
# Qt libs + virtual framebuffer for headless ODA File Converter
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
python3 python3-pip wget ca-certificates \
|
||||
@@ -10,14 +10,17 @@ RUN apt-get update && \
|
||||
libglib2.0-0 libgl1 libfontconfig1 libfreetype6 && \
|
||||
pip3 install --no-cache-dir --break-system-packages flask && \
|
||||
apt-get purge -y python3-pip && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
apt-get autoremove -y
|
||||
|
||||
# Download and install ODA File Converter
|
||||
RUN wget -q "https://download.opendesign.com/guestfiles/Demo/ODAFileConverter_QT6_lnxX64_8.3dll_25.12.deb" \
|
||||
RUN wget -q "https://www.opendesign.com/guestfiles/get?filename=ODAFileConverter_QT6_lnxX64_8.3dll_27.1.deb" \
|
||||
-O /tmp/oda.deb && \
|
||||
dpkg -i /tmp/oda.deb || apt-get install -f -y && \
|
||||
rm /tmp/oda.deb
|
||||
rm /tmp/oda.deb && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
# Find the binary and symlink to /usr/local/bin for PATH access
|
||||
find / -name "ODAFileConverter" -type f -executable 2>/dev/null | head -1 | \
|
||||
xargs -I{} ln -sf {} /usr/local/bin/ODAFileConverter
|
||||
|
||||
WORKDIR /app
|
||||
COPY app.py .
|
||||
|
||||
Reference in New Issue
Block a user