Skip to content

Commit

Permalink
Use vtk binary for arm images
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgensd committed Oct 16, 2023
1 parent b8fc752 commit c809251
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
FROM ghcr.io/fenics/dolfinx/lab:nightly
# Execute from root of repo as: docker buildx build --platform=linux/arm64,linux/amd64 -f docker/Dockerfile ./docker/ --progress=plain

FROM ghcr.io/fenics/dolfinx/lab:v0.7.0
ARG TARGETPLATFORM

WORKDIR /tmp/

ENV DEB_PYTHON_INSTALL_LAYOUT=deb_system
ENV HDF5_MPI="ON"
ENV HDF5_DIR="/usr/local"
ENV PYVISTA_JUPYTER_BACKEND="panel"

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

# BUILD VTK
# ENV VTK_VERSION="v9.2.6"
# RUN git clone --recursive --branch ${VTK_VERSION} --single-branch https://gitlab.kitware.com/vtk/vtk.git vtk && \
# cmake -G Ninja -DVTK_WHEEL_BUILD=ON -DVTK_WRAP_PYTHON=ON vtk/ && \
# ninja && \
# python3 setup.py bdist_wheela

RUN echo ${TARGETPLATFORM}
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
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then python3 -m pip install vtk; fi

ADD requirements.txt /tmp/requirements.txt
RUN python3 -m pip install --no-cache-dir -U -r requirements.txt
RUN python3 -m pip install --no-cache-dir -v -r requirements.txt
RUN python3 -m pip cache purge
RUN jupyter lab build
ENTRYPOINT ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser", "--allow-root"]

0 comments on commit c809251

Please sign in to comment.