-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_py3.11
69 lines (60 loc) · 1.66 KB
/
Dockerfile_py3.11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM python:3.11-bullseye
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
# Set up configuration envvars
ENV INSTALL_DIR=/usr/local \
FSL_VERSION=6.0.7.9 \
MRTRIX_VERSION=3.0.4 \
VIRTUAL_ENV=/venv
# Initial update
RUN apt update && \
apt install -y \
apt-utils \
wget \
curl \
nano \
software-properties-common \
jq \
libblas-dev \
liblapack-dev \
libatlas-base-dev \
gfortran \
git \
g++ \
clang \
libeigen3-dev \
zlib1g-dev \
libqt5opengl5-dev \
libqt5svg5-dev \
libgl1-mesa-dev \
libfftw3-dev \
libtiff5-dev \
libpng-dev
# Install Poetry
ENV POETRY_HOME=${INSTALL_DIR}/poetry
RUN curl -sSL https://install.python-poetry.org | python3 -
ENV PATH=${PATH}:${POETRY_HOME}/bin
# Install UV
RUN pip install uv && \
uv venv ${VIRTUAL_ENV} && \
uv pip install -U pip setuptools wheel
ENV PATH=$PATH:${VIRTUAL_ENV}/bin
# Install FSL
RUN curl https://fsl.fmrib.ox.ac.uk/fsldownloads/fslinstaller.py -o /tmp/fslinstaller.py
RUN echo "/usr/local/fsl" | python /tmp/fslinstaller.py -V ${FSL_VERSION}
# Configure FSL Environment
ENV FSLDIR=${INSTALL_DIR}/fsl
ENV FSLOUTPUTTYPE=NIFTI_GZ
ENV PATH=$PATH:${FSLDIR}/bin
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FSLDIR}
# Build and configure MRTRIX3
ENV MRTRIXDIR=${INSTALL_DIR}/mrtrix3
RUN git clone --branch ${MRTRIX_VERSION} https://github.com/MRtrix3/mrtrix3.git ${MRTRIXDIR}
ENV CXX=/usr/bin/clang++
ENV ARCH=native
RUN cd ${MRTRIXDIR} && \
./configure -nogui -openmp && \
./build
ENV PATH=$PATH:${MRTRIXDIR}/bin
# Remove unwanted packages
RUN apt autoremove && apt-get clean
CMD ["/bin/bash"]