-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors building in docker #23
Comments
did you solve it? |
Unless you are running an old version of the code, greedy should be built
with ITK5.
Here is a dockerfile that builds greedy and other tools from our group:
https://github.com/pyushkevich/tk-docker
And the container itself is *pyushkevich/tk:latest*
…On Wed, Dec 20, 2023 at 7:11 PM neuronflow ***@***.***> wrote:
did you solve it?
—
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJPEW73IQMREXCRESE774DYKN5EDAVCNFSM4X5MYASKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBWGUZTAMJSGIYQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thank you. Will this work on ARM CPUs, specifically M1 Apple silicon? |
The Docker container won't work on M1, but I believe the script in the
Dockerfile should work.
…On Thu, Dec 21, 2023 at 9:26 AM neuronflow ***@***.***> wrote:
Thank you. Will this work on ARM CPUs, specifically M1 Apple silicon?
—
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJPEW4HRVVYZAATLJK5Y63YKRBK3AVCNFSM4X5MYASKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBWGYZTMMRRGY4A>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
we are trying to build greedy in a debian based docker running on an M1 Mac without success so far. Here are our current efforts:
currently when we run greedy inside the container we get:
|
Sounds like LD_LIBRARY_PATH should be set in the environment to point to
where the VTK build places the .so files. Or in your VTK build, make it be
static.
…On Thu, Dec 21, 2023 at 11:08 AM neuronflow ***@***.***> wrote:
we are trying to build greedy in a debian based docker running on an M1
Mac without success so far.
Here are our current efforts:
FROM python:3.10.13-bullseye
ARG BUILD_JOBS=16
# # Setup LST-AI
RUN mkdir -p /custom_apps/lst_directory
# Install prerequisites
# c.f. https://greedy.readthedocs.io/en/latest/install.html#compiling-from-source-code
RUN apt-get update && \
apt-get install -y cmake g++ git
# Install additional dependencies for VTK
RUN apt-get install -y libgl1-mesa-dev libxt-dev
# Install libpng
RUN apt-get install -y libpng-dev
# Build VTK
# Download and unpack VTK
WORKDIR /VTK
RUN git clone https://gitlab.kitware.com/vtk/vtk.git
WORKDIR /VTK/vtk
RUN git checkout v9.1.0
# Create and navigate to the build directory for VTK
RUN mkdir VTK-build
WORKDIR /VTK/vtk/VTK-build
# Run CMake to configure and build VTK
RUN cmake -DCMAKE_BUILD_TYPE=Release ..
RUN make -j ${BUILD_JOBS}
RUN make install
# Build ITK
# c.f. https://itk.org/Wiki/ITK/Getting_Started/Build/Linux
# Clone the ITK repository
RUN git clone https://github.com/InsightSoftwareConsortium/ITK.git /ITK
WORKDIR /ITK
# Checkout the specific version
RUN git checkout v5.1.2
# Create and navigate to the build directory
RUN mkdir -p /ITK/build
WORKDIR /ITK/build
# Run CMake to configure and build ITK
RUN cmake -DModule_ITKPNG=ON \
-DITK_USE_SYSTEM_PNG=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_BUILD_TYPE=Release ..
# run build process
RUN make -j ${BUILD_JOBS}
RUN make install
# Clone the greedy repository
RUN git clone https://github.com/pyushkevich/greedy /greedy
WORKDIR /greedy
RUN git checkout 1eafa4c
# Set the working directory to the build directory
WORKDIR /greedy/build
# Run ccmake from the build directory
RUN cmake -DITK_DIR=/ITK/build \
-DVTK_DIR=/VTK/vtk/VTK-build \
-DCMAKE_BUILD_TYPE=Release \
..
RUN make -j ${BUILD_JOBS}
RUN make install
currently when we run greedy inside the container we get:
greedy: error while loading shared libraries: libvtkIOPLY-9.1.so.1: cannot open shared object file: No such file or directory
—
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJPEW7UVK6YUXLYFPRYBCDYKRNH7AVCNFSM4X5MYASKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBWGY2TONBZGIYA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Thanks, I will try to find out how to implement what you suggested. Meanwhile I used your Dockerfile to build an image on my M1 system and added our payload to it. However, when I create containers from it I get:
|
@neuronflow do you need to run greedy on a M1 machine, or do you need to run it on another linux machine? If your greedy is meant to be running on a M1 machine, try this binary instead of building from scratch. |
@jilei-hao We need to run greedy inside a Linux-based docker container running on OSX on a M1 machine. We managed to get it running now, thanks to the advice from @pyushkevich. This file seems to work:
|
I've been trying to get greedy to build in a docker container but I'm running into errors with
isnan
ITK: 4.12.2
greedy: a9fcaac
Dockerfile
ITK builds fine but when it gets to greedy I get error messages like
full log:
build.log
The text was updated successfully, but these errors were encountered: