Skip to content

Commit 68b7987

Browse files
authored
Create Dockerfile
1 parent 62b9e1c commit 68b7987

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

Dockerfile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
FROM ubuntu:24.04@sha256:6015f66923d7afbc53558d7ccffd325d43b4e249f41a6e93eef074c9505d2233
2+
3+
# Install required dependencies
4+
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
5+
git \
6+
build-essential cmake \
7+
# liboctdata needs boost
8+
libboost-iostreams-dev libboost-locale-dev libboost-log-dev libboost-numpy-dev libboost-program-options-dev libboost-python-dev libboost-serialization-dev \
9+
# opencv is a core lib for libe2e/liboctdata
10+
libopencv-dev libopenjp2-7-dev \
11+
# liboctdata dicom support
12+
libdcmtk-dev \
13+
# for auditwheels
14+
patchelf \
15+
libnsl-dev && \
16+
apt-get clean && \
17+
rm -rf /var/lib/apt/lists/*
18+
19+
RUN groupadd -r appuser && useradd -r -g appuser appuser
20+
21+
# Set the working directory
22+
WORKDIR /home/appuser
23+
RUN mkdir -p /home/appuser/oct
24+
25+
WORKDIR /home/appuser/oct
26+
27+
RUN git clone https://github.com/kaygdev/oct_cpp_framework.git
28+
RUN git clone https://github.com/fzhem/LibE2E.git
29+
RUN git clone https://github.com/fzhem/LibOctData.git
30+
RUN git clone https://github.com/fzhem/octdata4python.git
31+
32+
RUN echo "🛠 Building oct_cpp_framework..."
33+
RUN mkdir /home/appuser/oct/oct_cpp_framework/build
34+
WORKDIR /home/appuser/oct/oct_cpp_framework/build
35+
RUN cmake -DCMAKE_BUILD_TYPE=Release ..
36+
RUN make -j$(nproc)
37+
38+
RUN echo "🛠 Building LibE2E..."
39+
RUN mkdir /home/appuser/oct/LibE2E/build
40+
WORKDIR /home/appuser/oct/LibE2E/build
41+
RUN cmake -DCMAKE_BUILD_TYPE=Release ..
42+
RUN make -j$(nproc)
43+
44+
RUN echo "🛠 Building LibOctData..."
45+
RUN mkdir /home/appuser/oct/LibOctData/build
46+
WORKDIR /home/appuser/oct/LibOctData/build
47+
RUN cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_SUPPORT_DICOM=ON ..
48+
RUN make -j$(nproc)
49+
RUN make install
50+
51+
RUN echo "🛠 Building octdata4python..."
52+
WORKDIR /home/appuser/oct/octdata4python
53+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
54+
RUN for PYVER in 3.10 3.11 3.12; do \
55+
uv sync --python=$PYVER && \
56+
.venv/bin/python3 -m build --installer=uv && \
57+
CLEANVER=$(echo $PYVER | tr -d '.') && \
58+
.venv/bin/python3 -m auditwheel repair dist/octdata4python-*-cp${CLEANVER}*.whl --plat manylinux_2_39_x86_64; \
59+
done

0 commit comments

Comments
 (0)