-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
74 lines (61 loc) · 2.56 KB
/
Dockerfile
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
70
71
72
73
74
#The base image is the latest ubuntu docker image
FROM python:3.9.16-slim-bullseye
# Prepare environment
RUN apt-get update && \
apt-get install -y --no-install-recommends \
apt-utils \
autoconf \
build-essential \
bzip2 \
ca-certificates \
curl \
gcc \
git \
gnupg \
libtool \
lsb-release \
pkg-config \
unzip \
wget \
xvfb \
zlib1g \
default-jre \
pip && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/
RUN python3 -m pip install --upgrade pip
RUN pip install numpy
#Setup MCR - this grabs v912 of MCR that was downloaded from the matlab
#website, installed at MSI, and then zipped. If you want to use a
#different version of matlab then download the corresponding version
#of MCR, install it, zip it, and upload the new path to a public bucket
#on S3
RUN mkdir /mcr_path
RUN df -h \
&& wget https://s3.msi.umn.edu/leex6144-public/v912.zip -O /mcr_path/mcr.zip \
&& cd /mcr_path && unzip -q ./mcr.zip || { echo "Unzip failed"; exit 1; } \
&& rm /mcr_path/mcr.zip
#Download the unique code for this project
RUN mkdir /python_code
RUN wget https://s3.msi.umn.edu/leex6144-public/HBCD-MADE-v150.zip -O /python_code/code.zip \
&& cd /python_code && unzip -q ./code.zip \
&& rm /python_code/code.zip
#Download the sample locations/electrode files
RUN mkdir /sample_locs
RUN wget https://s3.msi.umn.edu/leex6144-public/sample_locs_june24_24.zip -O /sample_locs/sample_locs.zip \
&& cd /sample_locs && unzip -q ./sample_locs.zip \
&& rm /sample_locs/sample_locs.zip
#Export paths (make sure LD_LIBRARY_PATH is set to the correct version)
ENV MCR_PATH=/mcr_path/v912
ENV EXECUTABLE_PATH=/python_code/run_compiled.sh
ENV LD_LIBRARY_PATH ="${LD_LIBRARY_PATH}:/mcr_path/v912/runtime/glnxa64:/mcr_path/v912/bin/glnxa64:/mcr_path/v912/sys/os/glnxa64:/mcr_path/v912/extern/bin/glnxa64"
#Add code dir to path
ENV PATH="${PATH}:/python_code"
ENV pipeline_name=made
COPY ./python_code/run.py /python_code/$pipeline_name
COPY ./python_code/run.py /python_code/run.py
#Add site timing file that is specific for HBCD
RUN mkdir /site_timing_info
COPY ./site_flag_delays_v2025_01_09.csv /site_timing_info/
#Change Permissions
RUN chmod 555 -R /mcr_path /python_code /sample_locs /site_timing_info
ENTRYPOINT ["made"]