-
Notifications
You must be signed in to change notification settings - Fork 53
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
fix Dockerfile by adding libpugixml1v5 #135
base: master
Are you sure you want to change the base?
Conversation
te dejo mi dockerfile: Primera fase: ismrmrd_baseFROM ubuntu:22.04 as ismrmrd_base ARG DEBIAN_FRONTEND=noninteractive Instalar las dependencias necesarias, incluidas las bibliotecas de desarrollo y herramientas de compilaciónRUN apt-get update && apt-get install -y git cmake g++ libhdf5-dev libxml2-dev libxslt1-dev libboost-all-dev xsdcxx libxerces-c-dev libtinyxml-dev libpugixml-dev libhdf5-serial-dev h5utils hdf5-tools RUN mkdir -p /opt/code Crear directorio para siemens_to_ismrmrd y copiar el contenidoRUN mkdir -p /opt/code/siemens_to_ismrmrd Clonar y compilar la biblioteca ISMRMRDRUN cd /opt/code && Compilar el convertidor siemens_to_ismrmrdRUN cd /opt/code/siemens_to_ismrmrd && Crear un archivo comprimido con las bibliotecas de ISMRMRD para la siguiente faseRUN cd /usr/local/lib && tar -czvf libismrmrd.tar.gz libismrmrd* Segunda fase: imagen ligera con las dependencias mínimasFROM ubuntu:22.04 Instalar las dependencias mínimas necesarias para ejecutar el convertidor y las bibliotecas ISMRMRDRUN apt-get update && apt-get install -y --no-install-recommends libxslt1.1 libhdf5-dev libxerces-c-dev libboost-all-dev libpugixml1v5 && apt-get clean && rm -rf /var/lib/apt/lists/* Copiar el binario de siemens_to_ismrmrd y las bibliotecas de la fase anteriorCOPY --from=ismrmrd_base /usr/local/bin/siemens_to_ismrmrd /usr/local/bin/siemens_to_ismrmrd Descomprimir las bibliotecas de ISMRMRD y ejecutar ldconfig para actualizar las referencias de las bibliotecasRUN cd /usr/local/lib && tar -zxvf libismrmrd.tar.gz && rm libismrmrd.tar.gz && ldconfig |
automate the process by means of a bat file and rebuild in batches: @echo off REM Directorios para los archivos de entrada y salida REM Directorio para guardar los archivos XML/XSL extraídos REM Extraer el archivo incrustado IsmrmrdParameterMap_Siemens_NX.xsl si aún no está extraído REM Verificar si el directorio de entrada contiene archivos .dat REM Iterar sobre todos los archivos .dat en el directorio de entrada
) echo Conversión completa. |
Hi Cenarius, |
After building the image and trying to use the library I encounter an error: (step to reproduce)
% docker build -t siemens_to_ismrmrd_image .
% docker run -it siemens_to_ismrmrd_image /bin/bash
root@e8fb57b6c3b9:/# siemens_to_ismrmrd
siemens_to_ismrmrd: error while loading shared libraries: libpugixml.so.1: cannot open shared object file: No such file or directory
I fixed the error by adding libpugixml1v5 in the second stage of the building process. Now running the same code results in:
% docker build -t siemens_to_ismrmrd_image .
% docker run -it siemens_to_ismrmrd_image /bin/bash
root@c5f0bf7c81bb:/# siemens_to_ismrmrd
Missing Siemens DAT filename
Allowed options:
-h [ --help ] Produce HELP message
-v [ --version ] Prints converter version and ISMRMRD version
-f [ --file ]
-z [ --measNum ]
-Z [ --allMeas ]
-M [ --multiMeasFile ]
--skipSyncData <Skip syncdata (PMU) conversion>
--attachTrajectory
-m [ --pMap ]
-x [ --pMapStyle ]
-o [ --output ]
-g [ --outputGroup ]
-l [ --list ]
-e [ --extract ]
-X [ --debug ]
-F [ --flashPatRef ]
-H [ --headerOnly ] <HEADER ONLY flag (create xml header only)>
-B [ --bufferAppend ]
--studyDate <User can supply study date, in the format of
yyyy-mm-dd>