-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
32 lines (22 loc) · 1.38 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
FROM rocker/r-ver
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y python3 python3-pip python3-venv curl unzip git
RUN python3 -m pip install --upgrade pip
RUN pip install synapseclient
RUN git clone https://github.com/Sage-Bionetworks/recover-parquet-external.git /root/recover-parquet-external
RUN Rscript /root/recover-parquet-external/install_requirements.R
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& ./aws/install
RUN curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" -o "session-manager-plugin.deb" \
&& dpkg -i session-manager-plugin.deb
RUN curl -o /root/synapse_creds.sh https://raw.githubusercontent.com/Sage-Bionetworks-IT/service-catalog-ssm-access/main/synapse_creds.sh \
&& chmod +x /root/synapse_creds.sh
RUN mkdir -p /root/.aws
RUN curl -o /root/.aws/config https://raw.githubusercontent.com/Sage-Bionetworks-IT/service-catalog-ssm-access/main/config
RUN sed -i -e "s|\"<PERSONAL_ACCESS_TOKEN>\"|\"\${AWS_SYNAPSE_TOKEN}\"\n|g" \
-e "s|/absolute/path/to/synapse_creds.sh|/root/synapse_creds.sh|g" \
/root/.aws/config
CMD R -e "q()" \
&& sed -i -e "s|\${AWS_SYNAPSE_TOKEN}|$AWS_SYNAPSE_TOKEN|g"\
/root/.aws/config \
&& Rscript /root/recover-parquet-external/scripts/main/internal_to_external_staging.R