Skip to content

Commit c809251

Browse files
committed
Use vtk binary for arm images
1 parent b8fc752 commit c809251

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

docker/Dockerfile

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
FROM ghcr.io/fenics/dolfinx/lab:nightly
1+
# Execute from root of repo as: docker buildx build --platform=linux/arm64,linux/amd64 -f docker/Dockerfile ./docker/ --progress=plain
2+
3+
FROM ghcr.io/fenics/dolfinx/lab:v0.7.0
4+
ARG TARGETPLATFORM
25

3-
WORKDIR /tmp/
46

57
ENV DEB_PYTHON_INSTALL_LAYOUT=deb_system
68
ENV HDF5_MPI="ON"
79
ENV HDF5_DIR="/usr/local"
810
ENV PYVISTA_JUPYTER_BACKEND="panel"
911

10-
# Requirements for pyvista (gl1 and render1) and jupyterlab (nodejs and curl)
12+
# # Requirements for pyvista (gl1 and render1) and jupyterlab (nodejs and curl)
1113
RUN apt-get update && apt-get install -y libgl1-mesa-glx libxrender1 xvfb curl
1214
RUN curl -sL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh && \
1315
bash nodesource_setup.sh && \
@@ -16,8 +18,19 @@ RUN curl -sL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh && \
1618
# Upgrade setuptools and pip
1719
RUN python3 -m pip install -U setuptools pip pkgconfig
1820

21+
# BUILD VTK
22+
# ENV VTK_VERSION="v9.2.6"
23+
# RUN git clone --recursive --branch ${VTK_VERSION} --single-branch https://gitlab.kitware.com/vtk/vtk.git vtk && \
24+
# cmake -G Ninja -DVTK_WHEEL_BUILD=ON -DVTK_WRAP_PYTHON=ON vtk/ && \
25+
# ninja && \
26+
# python3 setup.py bdist_wheela
27+
28+
RUN echo ${TARGETPLATFORM}
29+
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then python3 -m pip install "https://github.com/finsberg/vtk-aarch64/releases/download/vtk-9.2.6-cp310/vtk-9.2.6.dev0-cp310-cp310-linux_aarch64.whl"; fi
30+
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then python3 -m pip install vtk; fi
31+
1932
ADD requirements.txt /tmp/requirements.txt
20-
RUN python3 -m pip install --no-cache-dir -U -r requirements.txt
33+
RUN python3 -m pip install --no-cache-dir -v -r requirements.txt
2134
RUN python3 -m pip cache purge
2235
RUN jupyter lab build
2336
ENTRYPOINT ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser", "--allow-root"]

0 commit comments

Comments
 (0)